Re: [Q] use of 'use' available?

From: Date: Wed, 31 May 2000 19:19:11 +0000
Subject: Re: [Q] use of 'use' available?
Groups: php.general 
Request: Send a blank email to php-general+get-750@lists.php.net to get a copy of this message
Chuck, You could set a unique variable in 'mylib.php', for instance, then have each page check for the variable and/or contents. If it isn't present, require or include. Best Regards, Ken Minx ConsultSOURCE, LLC. http://consultsource.com/index2.php3 ken.minx@consultsource.com -----Original Message----- From: chagenbu@wso.williams.edu <chagenbu@wso.williams.edu> To: php-general@lists.php.net <php-general@lists.php.net> Date: Wednesday, May 31, 2000 11:12 AM Subject: Re: [PHP-GENERAL] [Q] use of 'use' available? >Quoting Zeev Suraski <zeev@zend.com>: > >> No, you can't/shouldn't make use of 'use'. It was only available in a few >> alpha/beta versions of PHP 4.0, and has been deprecated. Use >> require_once() instead. > >Is this a permanent decision, then? I was under the impression that it just >needed work and would be re-introduced later... > >The only problem I see with the require_once/include_once combo is that from >what I remember being said about them, they don't check each other's lists of >included files? Could that be changed? > >Ie, if you do require_once 'mylib.php', and then later on some code that you use >(a different library) relies on mylib.php, and dynamically includes it only in >the cases where it needs it by using include_once, it won't be included the >second time? > >-chuck > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#750) next »