static function borrowBook() { if (FALSE == self::$isLoanedOut) { if (NULL == self::$book) { self::$book = new BookSingleton(); } self::$isLoanedOut = TRUE; return self::$book; } else { return NULL; } }
static function borrowBook() { if (false == self::$isLoanedOut) { if (null == self::$book) { self::$book = new BookSingleton(); } self::$isLoanedOut = true; return self::$book; } else { return null; } }