|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-12 12:03 UTC] jo at feuersee dot de
-Summary: BC break in behavior of is_a()
+Summary: BC break in behavior of is_a() (1st param '' no
longer accepted)
[2011-07-12 12:03 UTC] jo at feuersee dot de
[2011-07-12 14:51 UTC] sixd@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: sixd
[2011-07-12 14:51 UTC] sixd@php.net
[2011-07-12 14:52 UTC] sixd@php.net
-Assigned To: sixd
+Assigned To: stas
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 10:00:01 2025 UTC |
Description: ------------ I notice a different bahavior between PHP5.3.6 and a daily build supplied by the openSUSE build service, designated php5-5.3.6.201107111820-83.1 with php - output is "PHP 5.3.7RC3-dev (cli)" In short, is_a('', '') emits a warning with php/5.3.7rc3 which did not happen with 5.3.6 and AFAIK earlier versions. I know that is_a('', '') doesn't make much sense, but it's a BC break. To be more precise, I stumbled across this when upgrading a PEAR repo and to my surprise got a bunch of warnings (Warning: Unknown class passed as parameter in /usr/share/php5/PEAR/PEAR.php on line 252) and tracked it down to the is_a() call. I'm not really sure if this was planned and/or is a documentation issue, but just to be sure it is an intentional change I put this here to be discussed. AFAIK from reading the php.internals mailing list, such a change in behavior in a minor update is most likely not intentional ;) Test script: --------------- In a shell type the following: php -r 'printf("%d\n", is_a("", ""));' (Note: in case of Windows OS the ' and " have to be replaced with each other) Expected result: ---------------- 0 Actual result: -------------- Warning: Unknown class passed as parameter in Command line code on line 1 0