At 12:39 18/09/2006, P wrote:
I never saw any argument justifying the removal of the dl() feature, even if the CLI SAPI
keeps it. But I can give at least two against it :

- If extensions cannot be loaded from the PHP code any more, it becomes impossible to autoload them when needed. As I wrote in another message, one of the benefits a 'smart' autoload handler could bring, would be to allow extension autoloading. And not only for CLI programs: when you distribute a software, it would be much better to autoload extensions in a transparent manner
than require an unexperienced user to modify his php.ini file.

- Unless there's a good reason to suppress this feature, I don't see why we should introduce a
difference between the CLI SAPI and other interfaces.

IMHO, the decision to remove dl() is wrong. Maybe it looked like a good idea at first, but
considering all its implications, it is not.

Francois,

There are good reasons to remove it. It's not that we suddenly thought PHP would be a better language without dl(), it just doesn't fit the Web model PHP is used with and cannot be implemented reliably. That's why we kept it where it makes sense (CLI), and deprecated it in the web SAPIs.

By the way, a smart autoloader in a real world PHP environment will most certainly always be *less* efficient than loading the extension at startup, because it cannot be shared between instances.

Zeev

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to