|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-07 11:11 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 00:00:01 2025 UTC |
Description: ------------ the 1st code make apache crash, and the 2nd make apache freeze, taking full cpu usage notice that the "exit" statement is important noting will happend when "exit" is removed only class methods is affected, not function Reproduce code: --------------- crash: <?php class A { function &getInstance() { if (empty($GLOBALS['a'])) { $GLOBALS['a'] = &new A(); } return $GLOBALS['a']; } } $a = &A::getInstance(); exit; ?> freeze: <?php class A { function &getInstance() { return $GLOBALS['a']; } } $a = &A::getInstance(); exit; ?>