|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-21 08:24 UTC] lenar at dotcom dot ee
[2001-06-21 10:51 UTC] zeev@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
First, my stripped down code that works: <? class a { function make($params) { } } class b extends a { function make() { echo "WORKS OK"; } } class c extends b { function make($params) { parent::make(); } } class d extends c { function make($params) { parent::make($params); } } $d = new d(); $d->make("whatever"); ?> now, when i remove the definition of class 'a' to another file and include the file like this: file1.php: <? class a { function make($params) { } } ?> file2.php: <? include "./file1.php"; // or require - no difference class b extends a { function make() { echo "WORKS OK"; } } class c extends b { function make($params) { // this gets called forever !!!! and generating warnings parent::make(); } } class d extends c { function make($params) { parent::make($params); } } $d = new d(); $d->make("whatever"); ?> then i get message 'Warning: Missing argument 1 for make()' ... the code is same ... but working differently. at least with my php 4.0.5. so i think this is a bug.