RE: [PHP-DEV] is_a fix for 5.4 and HEAD
| From: | Jonathan Bond-Caron | Date: | Mon, 17 Oct 2011 13:22:33 +0000 |
| Subject: | RE: [PHP-DEV] is_a fix for 5.4 and HEAD | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-55843@lists.php.net to get a copy of this message | ||
On Sun Oct 16 06:59 PM, Stas Malyshev wrote:
> It definitely makes PHP worse by propagating inconsistent APIs.
I created a patch against 5.4:
https://bugs.php.net/patch-display.php?bug_id=55475&patch=is_a_5.4_alternati
ve&revision=latest
The patch changes the behavior to:
is_a("ab", "b") // false
is_a("ab", "b", true) // autoload "ab", autoload "b" --
false
is_subclass_of("ab", "b") // false
is_subclass_of("ab", "b", true) // autoload "ab", autoload
"b" -- false
Both class names can be "autoloaded" but not by default
Thoughts?