Re: [PHP-DEV] RC2 and integer/float handling in 5.3

2009-04-04 Thread Lukas Kahwe Smith
On 31.03.2009, at 00:32, Lukas Kahwe Smith wrote: On 31.03.2009, at 00:27, Pierre Joye wrote: On Tue, Mar 31, 2009 at 12:09 AM, Lukas Kahwe Smith > wrote: Hi guys, Just wanted to know if those issues are resolved? I rather not have a flow of changes in this area just before the next RC2.

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Sebastian Bergmann
Roman Borschel schrieb: > i created 2 patches that are attached to this mail Your attachments did not make it to the list. No worries, though, I committed a patch together with updated tests earlier. -- Sebastian BergmannCo-Founder and Principal Consultant http://sebastian-

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Roman Borschel
Hi, i created 2 patches that are attached to this mail, one to fix the issue and the other to add tests for it (I added them into reflectionProperty_setAccessible.phpt). Roman On Apr 4, 2009, at 1:23 PM, Johannes Schlüter wrote: On Sat, 2009-04-04 at 13:08 +0200, Roman Borschel w

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Johannes Schlüter
On Sat, 2009-04-04 at 13:08 +0200, Roman Borschel wrote: > My "patch" is simply to replace the first argument of > zend_update_property/zend_read_property in ext/php_reflection.c like > this: [...] > So simply replacing Z_OBJCE_P(object) with ref->ce. yes, that was what i was thinking about, t

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Sebastian Bergmann
Johannes Schlüter schrieb: > This really looks like a bug in this feature. I will have a look at it this afternoon. -- Sebastian BergmannCo-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/ -- PHP Internals - PHP Ru

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Johannes Schlüter
On Sat, 2009-04-04 at 07:34 +0200, Roman Borschel wrote: > Thanks for your answer. Yes, this works, but here $f is an instance of > Foo, not Bar. When you make it an instance of Bar you get NULL. I > think this is not correct, is it? > Given that we have a ReflectionProperty of class Foo at han

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Roman Borschel
Hi, Despite my almost non-existant C-skills I managed to put together a "patch" (or what I think is a patch) that does not break any tests. My "patch" is simply to replace the first argument of zend_update_property/zend_read_property in ext/php_reflection.c like this: within the getValu

Re: [PHP-DEV] Private properties, Inheritance, Reflection (5.3)

2009-04-04 Thread Roman Borschel
For what it matters, the same thing in Java returns the expected result: Class clazz = Foo.class; Field fooProp = clazz.getDeclaredField("foo"); fooProp.setAccessible(true); Bar bar = new Bar(); String value = (String)fooProp.get(bar); System.out.println(value); So is this a bug or some weird be