|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-09-01 12:42 UTC] gmblar+php at gmail dot com
Description:
------------
recursive __call cause segfault
Test script:
---------------
<?php
class foo {
public function __call($method, $arguments) {
$this->bar();
}
}
$foo = new foo();
$foo->bar();
Expected result:
----------------
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 130968 bytes) in - on line 6
Actual result:
--------------
Segmentation fault: 11
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 21:00:01 2025 UTC |
I expect the same from __call as from a normal method which abort with a fatal error. <?php class foo { public function bar() { $this->bar(); } } $foo = new foo(); $foo->bar(); PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in - on line 5