|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-30 21:50 UTC] judas dot iscariote at gmail dot com
[2006-06-30 22:08 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 02:00:01 2025 UTC |
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