Bug #18530: Request for Delphi style "inherited" call

From: Date: Wed, 24 Jul 2002 08:11:45 +0000
Subject: Bug #18530: Request for Delphi style "inherited" call
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-15005@lists.php.net to get a copy of this message
From: woprog@hotmail.com Operating system: Any PHP version: 4.1.2 PHP Bug Type: Feature/Change Request Bug description: Request for Delphi style "inherited" call 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 -- Edit bug report at http://bugs.php.net/?id=18530&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18530&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18530&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18530&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18530&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18530&r=support Expected behavior: http://bugs.php.net/fix.php?id=18530&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18530&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18530&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18530&r=globals

« previous php.bugs (#15005) next »