Hi! On 8/24/11 11:05 AM, Pierre Joye wrote:
As it was working perfectly fine until now, it was perfectly fine to use is_a only to valid possible instances of a given class, passing a non object returned false, which was totally correct (per se).
I think you are confusing "worked for me" with "perfectly fine". Like calling file_exists on an array argument and relying on the fact that file by the name "Array" does not exist (it doesn't work this way, but could have worked in some old version). This is not a correct usage, it is just by chance does what you intended. Passing invalid arguments to a function and relying it would work properly is not a good idea.
Now call that a bug, fine, but it is a breakage in a patch release.
In general, I do not think we can promise bug compatibility, and shouldn't encourage people to expect it. In this particular instance, we may or may not make an exception, depending on how important is to have is_a work with strings. If we leave strings functionality in, autoloading should be a part of it, it's the only way it makes sense. But we could as well not include string support for is_a() in 5.3, it's not a critical fix IMHO.
About why it should not suddenly changes this working perfectly fine before. And about not calling autoload.
It did not work "perfectly fine" before. This code relied on a buggy undocumented behavior, in no universe it is "perfectly fine".
-- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php