|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-28 19:05 UTC] jimw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 19:00:01 2025 UTC |
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