From: [EMAIL PROTECTED] Operating system: Irrelevant PHP version: 4.4.4 PHP Bug Type: Scripting Engine problem Bug description: get_class_methods() guesses the existence of a constructor
Description: ------------ When instanciating a class without constructor, php will try to call the parent constructor. This bug may may also be related to #39127. get_class_methods() seems to guess that an imaginary constructor exists: Reproduce code: --------------- class a { function a() {} } class b extends a {} class c {} $b = new b; $c = new c; var_dump(get_class_methods($b), get_class_methods($c)); Expected result: ---------------- array(1) { [0]=> string(1) "a" } array(0) { } Actual result: -------------- array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } array(0) { } -- Edit bug report at http://bugs.php.net/?id=39129&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39129&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39129&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39129&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39129&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39129&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39129&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39129&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39129&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39129&r=support Expected behavior: http://bugs.php.net/fix.php?id=39129&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39129&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39129&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39129&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39129&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39129&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39129&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39129&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39129&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39129&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39129&r=mysqlcfg