From: me at evancarroll dot com Operating system: Linux PHP version: 5.2.10 PHP Bug Type: *General Issues Bug description: Black box method dispatch violated with magic methods
Description: ------------ In response to misclassified bug report http://bugs.php.net/bug.php?id=34739 I don't think you understand this bug report, this issue is that you can't know when a method is defined as being magic or not without providing some method of introspection into the class, not currently provided. In perl this is simple: //**** START EXAMPLE ****/// package Bar; sub AUTOLOAD { print "dynamic"; } package Foo; our @ISA = 'Bar'; sub static { print "static" } sub new { bless +{} } my $obj = Foo->new; $obj->static; $obj->dynamic; # Not dependant on it being defined dynamic/static //**** END EXAMPLE ****/// The issue is in PHP Bar methods have to be static for method dispatch and invocation to work, if Bar changes to use Magic methods it has to use a special syntax. This makes all subclasses of Bar dependent on Bar's method implementation. This is categorically wrong and is violation of Black Box for PHP's OOP. -- Edit bug report at http://bugs.php.net/?id=48649&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48649&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48649&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48649&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48649&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48649&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48649&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48649&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48649&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48649&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48649&r=support Expected behavior: http://bugs.php.net/fix.php?id=48649&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48649&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48649&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48649&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48649&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48649&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48649&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48649&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48649&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48649&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48649&r=mysqlcfg