Re: Function dl()
| From: | Zeev Suraski | Date: | Wed, 07 Mar 2001 10:20:45 +0000 |
| Subject: | Re: Function dl() | ||
| References: | 1 | Groups: | php.dev php.gtk |
| Request: | Send a blank email to php-dev+get-48144@lists.php.net to get a copy of this message | ||
Regardless of the request itself, it'd be much better if you loaded the .so/.dll in php.ini, instead of in every script. Loading it using dl() in every script is extremely inefficient.
Zeev
At 20:19 6/3/2001, Andrew Lawrence wrote:
I'm not a member of this list so please CC any replies to me or to the php-gtk list I would like to ask the PHP developers to consider the following change to the function dl() If the module name does not include an extension (i.e. no dot in the module name), add the appropriate extension as required for the operating - either .so or .dll as appropriate. The rational is a follows: 1) In php-gtk every, every script must be with something like if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/dl('php_gtk.dll');elsedl('php_gtk.so');This has caused a few problems where either the constant seemed to have an incorrect value or people screwed up the code. 2) As the distribution of PHP grows it is forseeable that the set of values for PHP_OS may change, resulting in broken code. Also the appropriate extensions may change as new operating systems are supported. 3) It would simply the php.ini file as the same extension= line would apply to both Linux and WinXX 4) And finnally, it is a simple compile time decision to determine with operating system is being used and set the appropriate default. I look forward to your feed-back. -- Andrew Lawrence Smoke & Mirrors http://www.smoke-and-mirrors.net Tel: 416 461-8708 Fax: 416 461-1758 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net