ID:               49629
 Updated by:       j...@php.net
 Reported By:      romain dot dorgueil at symfony-project dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: linux 2.6.18-4-vserver-686
 PHP Version:      5.2.11
 New Comment:

Changing it again would be rather idiotic. It's done, live with it.


Previous Comments:
------------------------------------------------------------------------

[2009-09-22 17:40:51] romain dot dorgueil at symfony-project dot com

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 this bug report at http://bugs.php.net/?id=49629&edit=1

Reply via email to