From: romain dot dorgueil at symfony-project dot com Operating system: linux 2.6.18-4-vserver-686 PHP version: 5.2.11 PHP Bug Type: *General Issues Bug description: Regression in 5.2 caused by #44144
Description: ------------ In #44144, it was said "spl_autoload_functions() should return object instances, not class names, when appropriate." "should" and "when appropriate" seems a bit hazardous, to speak about a feature that has been working some way until 5.2.10 After a discussion with Pierre, he summed it up well as : <Pierre> that's a very bad idea and break BC for a behavior that has existed for a good dozen releases I understand that maybe we want it to behave somehow else in future versions, but I'm not sure minor releases of php 5.2 are the best place for it. I will understand very well if this ticket is closed as invalid or wontfix (as the damage is already done, it's for sure a good idea not to change again in .12), but I wanted to report it to show how a so little BC change can affect some projects. Reproduce code: --------------- <?php class Foo { public function nonstaticMethod() {} } $foo = new Foo; spl_autoload_register(array($foo, 'nonstaticMethod')); $funcs = spl_autoload_functions(); print_r((int) is_object($func[0][0])); Expected result: ---------------- 0 Actual result: -------------- 1 -- Edit bug report at http://bugs.php.net/?id=49629&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49629&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49629&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49629&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49629&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49629&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49629&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49629&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49629&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49629&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49629&r=support Expected behavior: http://bugs.php.net/fix.php?id=49629&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49629&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49629&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49629&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49629&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49629&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49629&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49629&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49629&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49629&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49629&r=mysqlcfg