(re-sending, sorry if this arrives twice)

Hi,

On Mon, 2009-05-11 at 12:34 +0200, Kalle Sommer Nielsen wrote:
> 1) ReflectionParameter::getDefaultValue(), was added to HEAD in 2006,
> but never merged to a stable branch? I made a backport of the function
> to 5.3 [1] which I think we should merge, whether its gonna be 5.3.1
> or what.

This should be low risk as it's a self-contained function and we all est
HEAD ... but I'd prefer not adding anything but bug fixes to 5.3 as it
already took way too long.

> 2) _default_lookup_entry() is commented out by a macro in HEAD but is
> used in 5.3, and the only difference is the zend_hash_find ->
> zend_u_hash_find call for unicode?

Didn't take a look at the code so can't say much

> 3) Closures, theres alot of closure differences in HEAD and 5.3, for
> example HEAD has ReflectionMethod::getClosure() and
> ReflectionFunction::getClosureThis(), but 5.3 does not, which makes it
> looks like a change in 5.3 that never occured to HEAD, unless that is
> the logic is fixed in HEAD. We should really fix this, so 5.3 have
> these if needed.

At least getClosureThis() depends on $this handling which was reverted
from 5.3.
Not sure what getClosure() does.

> 4) How about an ReflectionNamespace, to analyze a namespace? Since
> theres no real way to use reflection on namespaces other than the
> "isNamespace" methods etc.

We have no real namespace meta-data available, the only way doing things
there would be by iterating over the class table and parsing the class
names. Not usre that's really a good thing to do.

> On a related note, I'd also like to propose an addition for
> reflection, whether its 5.3.1 or what (since we're so late in 5.3,
> theres no need to push more features), this is 3 new methods to the
> ReflectionExtension class[2]:
> 
> ReflectionExtension::isDynamicLoaded() - Returns if an extension was
> loaded through dl()

I was under the impression this was possible, or is it only printed by
export()?

> ReflectionExtension::getBuildId() - Gets the zend build id (added in
5.3)
> ReflectionExtension::getAPINo() - Gets the zend api no that the
> extension was compiled for (may not really be needed, since the number
> doesn't change very often nor may be of any real use)

I don't think this belongs to that class as these values should match
the one PHP was compiled with, so I think this should be a global
function.

johannes



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

Reply via email to