|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-07 06:13 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: Documentation problem
+Package: Scripting Engine problem
[2016-06-07 06:13 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 13 11:00:01 2025 UTC |
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