Edit report at https://bugs.php.net/bug.php?id=55475&edit=1
ID: 55475
Updated by: colder@php.net
Reported by: mads at gartneriet dot dk
Summary: is_a() triggers autoloader
Status: Assigned
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.3.7
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Well, we have 3 options here:
1) keep it like it is since 5.3.7
2) reverting it to how it worked before 5.3.7
3) change it even more to not use autoload, so that it neither works like <5.3.6 nor 5.3.7
Apparently through your proposed fix you're advocating for (3). If so, I can't see how it
would improve the situation in
any way.
Personally, given that the BC change is minimal, and that we're only adding functionality, (1)
seems fine.
Correct code existing before 5.3.6 will work just fine anyway.
Previous Comments:
------------------------------------------------------------------------
[2011-08-22 14:44:18] kalle@php.net
... the behaviour I'm talking about is obvious the return value and the fact that the
autoloader now is called.
------------------------------------------------------------------------
[2011-08-22 14:40:46] kalle@php.net
I'm talking about the usual procedure we have about changing behaviour, a function suddenly
returns the oppersite of what it used to in the middle of a stable series is very unlike to do, even
for PHP.
I knnow it went from not working to working, but I don't on the fact that such a commonly used
function will change behaviour like that. What we should do is to make a big fat warning in the
migration guide for 5.3.x -> 5.4.x about it, and in the manual.
It would be the same if we changed substr() to be case insensitive in the middle of a release
series, lets just not venture in such dark corners.
------------------------------------------------------------------------
[2011-08-22 14:27:31] colder@php.net
But what BC break are you talking about exactly?
It went from not-working (returning always false for strings as first argument)
to working with autoload.
------------------------------------------------------------------------
[2011-08-22 13:41:16] kalle@php.net
I'm not arguing that the new behaviour is wrong, I believe it is the desired too but I
don't agree to break BC in the middle of a stable release series nor as much as I would like to
myself to achieve the right behaviour.
------------------------------------------------------------------------
[2011-08-22 13:31:21] colder@php.net
It seems correct to me as well to trigger autoload in this case. It does and
always did so for is_subclass_of(), I don't see any reason for a condition of
"subclasses_only" to yes or no trigger the autoload.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=55475
--
Edit this bug report at https://bugs.php.net/bug.php?id=55475&edit=1