ID: 37976 Comment by: judas dot iscariote at gmail dot com Reported By: e at osterman dot com Status: Open Bug Type: Class/Object related Operating System: Redhat PHP Version: 5.1.4 New Comment:
this is the expected behaviuor, if you want recursion control to aid development or something, install xdebug. Previous Comments: ------------------------------------------------------------------------ [2006-06-30 18:54:58] e at osterman dot com Description: ------------ Sorry if this is a duplicate bug; the words __construct and segfault appear thousands of times in this bug database. If you try to construct an object of yourself in the constructor, the infinite recursion causes a segfault. Ofcourse, you never want to construct yourself like this, but then again, you never want to segfault either. Reproduce code: --------------- <? /* * Tested on: * PHP 5.1.4 (cli) (built: May 18 2006 09:50:08) * Copyright (c) 1997-2006 The PHP Group * Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies */ class SegFault { public function __construct() { new SegFault(); } } $breakme = new SegFault(); ?> Expected result: ---------------- PHP Warning: something to the effect of infinite recursion Actual result: -------------- Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37976&edit=1