PHP 4.0 Bug #8075: Make Function/Method return value a "direct" object

From: Date: Sat, 02 Dec 2000 04:31:40 +0000
Subject: PHP 4.0 Bug #8075: Make Function/Method return value a "direct" object
Groups: php.dev 
Request: Send a blank email to php-dev+get-39823@lists.php.net to get a copy of this message
From: za_ka_ria@yahoo.com 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

« previous php.dev (#39823) next »