|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-24 04:22 UTC] alan_k@php.net
[2002-07-24 04:27 UTC] woprog at hotmail dot com
[2002-07-24 04:35 UTC] derick@php.net
[2002-07-24 04:37 UTC] alan at akbkhome dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 20:00:02 2025 UTC |
This is a feature request, not a bug. ===================================== Check the following code: class A { function foo() { echo "A bar"; } } class B extends A { function foo() { echo "B bar"; } } When I want to call the parent version of the function foo() in B, I have to enter: A::foo(); thus including the actual classname of its parent... for me this is really annoying (I work a lot with classes in PHP)... could it be possible that the Delphi style of calling some classes parent version of some function is included in PHP? In Delphi this would look like this: type A = class function foo(); end; B = class(A) function foo(); end; function A.foo() begin // do something end; function B.foo() inherited; // would call A.foo // do something else end; As you can see in the Delphi code, there's no need to include the actual class name in the call. This is possible since Delphi doesn't support multiple inheritance. And as far as I know, PHP doesn't as well, so it should be possible, right? Would be really great to get feedback on this... Marc