Hi.

If this is documented somewhere, please point me there.

With recent discussions about getting extensions in or out of Core and
out or into PECL, why are ANY extensions part of core?

All platforms allow for configuration of allowable extensions, either
by compilation, or by config file (ini) changes or by the use of dl
(though this can now be restricted within PHP6 AFAIK).

From my observations on Experts Exchange, the majority of issues I've
seen with extensions is what is require to activate the extension. For
*ix users, it is where do they put external supporting libraries or
how do they make them available to the extension. Both of these are
documentation issues.

If PHP was, more or less, reduced to just the scripting
parser/executor and extension loader, the actual runtime code would be
significantly smaller, memory footprint would be smaller. The downside
would be the amount of processing required to activate the extension
(loading, initialising, etc).

By supplying a default highly recommended extension list or
./configure parameter list you can supply the same start point as the
current core.

One thing I can think of which would be an serious issue is
interdepenedance. If ext_A requires ext_B, I don't know what the
consequences would be. But again, a documentation issue to describe
dependencies - something like PEAR does maybe.

Not in a position to build PHP (still working on it), but how small is
PHP without any extensions and what sort of delays exist from loading
extensions.


Extending the load on demand mechanism (like the userland
auto_prepend_file/auto_append_file can be used for autoloading of
classes/code libraries/etc) to allow for autoloading of extensions
would be useful, only only useful in a non CGI/CLI mode where the list
could be maintained as extensions where examined. (Hmmm - not really
good enough).

I suppose my questions are

1 - What determines core or PECL?
2 - If extensions are moved out of core into PECL, do interdependency
problems exist?
3 - Are there any mechanisms for autoloading PECL extensions?
4 - Could namespaces be used as an extension autoloading mechanism?


An aside question about namespaces ...

If namespaces are

namespace::entity

is the expected syntax for calling a static method of a namespaced
class going to be

namespace::class::static_method();

?

Ah. userland COULD automate loading of extensions IF namespace
existance could be tested like class's existance.

if (!namespace_exists('namespace'))
{
dl('php_' . namespace . '.dll')
}

sort of thing.

Hmmm. .dll or .so (I think), so we would need a OS specific constant
(like DIRECTORY_SEPARATOR / PATH_SEPARATOR) - maybe
EXTENSION_EXTENSION (Ha!).

Ok, I've taken up enough time with this drivel. If I'm compleletly
barking up the wrong tree, then let me know.

Regards,

Richard Quadling.



--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

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

Reply via email to