Bug #72351 [NEW]: class A function F() class B extends A function F {$this->F()}

From: Date: Tue, 07 Jun 2016 05:37:08 +0000
Subject: Bug #72351 [NEW]: class A function F() class B extends A function F {$this->F()}
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13490@lists.php.net to get a copy of this message
From: 1050653098 at qq dot com Operating system: PHP version: 5.6.22 Package: Documentation problem Bug Type: Bug Bug description:class A function F() class B extends A function F {$this->F()} Description: ------------ class A function F() class B extends A function F {$this->F()} //error Fatal error: Allowed memory size of 536870912 bytes /Fatal error: Allowed memory size of 536870912 bytes // exhausted (tried to allocate 65488 bytes) //in D:\weicot\htdocs\dev\test.php on line 29 Test script: --------------- namespace A; class A { public function F() { } } namespace B; use A\A as A; class B extends A { public function F() { $this->F();//Fatal error: Allowed memory size of 536870912 bytes } } $B=new B(); $B->F(); <?php namespace A; class A { public function F() { } } namespace B; use A\A as A; class B extends A { public function F() { parent::F();//is note error } } $B=new B(); $B->F(); Expected result: ---------------- error die Actual result: -------------- error -- Edit bug report at https://bugs.php.net/bug.php?id=72351&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72351&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72351&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72351&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72351&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72351&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72351&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72351&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72351&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72351&r=support Expected behavior: https://bugs.php.net/fix.php?id=72351&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72351&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72351&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72351&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72351&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72351&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72351&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72351&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72351&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72351&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72351&r=mysqlcfg

« previous php.doc.bugs (#13490) next »