#39129 [Opn->Csd]: get_class_methods() guesses the existence of a constructor (4.4 only)
| From: | iliaa@php.net | Date: | Sun, 15 Oct 2006 17:06:50 +0000 |
| Subject: | #39129 [Opn->Csd]: get_class_methods() guesses the existence of a constructor (4.4 only) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103569@lists.php.net to get a copy of this message | ||
ID: 39129
Updated by: iliaa@php.net
Reported By: colder@php.net
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 4.4.4
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-10-11 18:25:38] colder@php.net
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 this bug report at http://bugs.php.net/?id=39129&edit=1