|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-15 17:06 UTC] iliaa@php.net
[2006-11-08 13:31 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 11:00:01 2025 UTC |
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) { }