Hi Ralph,
I reassigned it myself, and will take a look on Monday or Tuesday.
Thanks. Dmitry.
On 07/01/2011 02:48 AM, Ralph Schindler wrote:
Hey Dmitry,
is_a_impl() is an implementation that is shared by is_a() and
is_subclass_of() calls. There is a flag called only_subclass that allows
there to be switching behavior in is_a_impl().
The issue has been updated with a new patch that now takes objects into
account. It also has a comment in there that better explains what the
patch is doing.
I cannot assign it to you as I am not the original reporter, nor have
access, can you assign it to yourself?
Thanks,
Ralph
On 6/30/11 2:39 AM, Dmitry Stogov wrote:
Hi Ralph,
I agree with expected behavior, but didn't understand the patch and
which side effects it may have as well as the original implementation of
is_a_impl(). It looks for me like one huge bug :)
Please reassign the bug to me, if you like me to take a deeper look.
I can do it only on next week.
Thanks. Dmitry.
On 06/29/2011 11:39 PM, Ralph Schindler wrote:
Hi all,
Concerning: https://bugs.php.net/bug.php?id=53727
I had put together a quick patch against PHP_5_3 to fix, for what I and
others might consider, an issue with is_subclass_of() returning false in
this situation:
interface A {}
class B implements A {}
var_dump(is_subclass_of('B', 'A')); // false, should be true
It returns false in situations where a class does not have a parent. If
a parent currently exists, the above works fine. For example:
interface A {}
class B implements A {}
class C extends B {}
var_dump(is_subclass_of('B', 'A')); // true
Attached is a patch against PHP_5_3, I can create a patch against
PHP_5_4 if need be.
I've added a test file and all the current Zend/tests run as expected.
Thanks,
Ralph
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php