[PHP-DEV] PHP 4.0 Bug #8075: Make Function/Method return value a "direct" object From: za_ka_ria <email protected>
Date: 12/01/00

From: za_ka_ria <email protected>
Operating system: Redhat Linux 6.2
PHP version: 4.0.2
PHP Bug Type: Feature/Change Request
Bug description: Make Function/Method return value a "direct" object

What I mean is like this:

function &getDB() {
   global $DB;
   if (!isset $DB) $DB = new SomeDatabaseConnectionClass()
   return $DB
}

and in some function/method I just could use it like this
getDB()->query_limit($sql_text);

It sure will make my code a lot smaller.

TIA,

Zakaria

-- 
Edit Bug report at: http://bugs.php.net/?id=8075&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>