From:             
Operating system: Linux
PHP version:      5.3SVN-2011-07-12 (SVN)
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:BC break in behavior of is_a()

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


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55189&edit=1
-- 
Try a snapshot (PHP 5.2):            
https://bugs.php.net/fix.php?id=55189&r=trysnapshot52
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55189&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55189&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55189&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55189&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55189&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55189&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55189&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55189&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55189&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55189&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55189&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55189&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55189&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55189&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55189&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55189&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55189&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55189&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55189&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55189&r=mysqlcfg
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55189&r=trysnapshot54

Reply via email to