[dev] extensionExists() modification?

Jon Parise jon at horde.org
Wed Mar 3 14:07:01 PST 2004


On Wed, Mar 03, 2004 at 04:40:06PM -0500, Chuck Hagenbuch wrote:

> Suggestion: what about in Util::extensionExists(), if the ext isn't currently
> loaded, we try dl('ext.so') || dl('ext.dll')? That'd provide nice support for
> dynamic modules...

That would introduce a side-effect that doesn't really jive with the
function name.

I'd suggest adding a Util::loadExtension() function that calls
Util::extensionExists() and loads the extension if it's not already
available.  This would allow existing code to continue working until
it's updated to use the new function.

As an aside, dl() is apparently being deprecated in PHP5, although it
will still work with a warning.

-- 
Jon Parise (jon at horde.org) :: The Horde Project (http://horde.org/)


More information about the dev mailing list