Bug #67491 [Com]: Crush __debugInfo

From: Date: Tue, 24 Jun 2014 02:40:32 +0000
Subject: Bug #67491 [Com]: Crush __debugInfo
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186314@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67491&edit=1 ID: 67491 Comment by: anon at anon dot anon Reported by: imbolk at gmail dot com Summary: Crush __debugInfo Status: Not a bug Type: Bug Package: *General Issues Operating System: Mac OS X 10.9.3 PHP Version: 5.6.0RC1 Block user comment: N Private report: N New Comment: johannes, var_dump correctly detects recursion in every other case. I don't see why it shouldn't be able to when __debugInfo is used too. Previous Comments: ------------------------------------------------------------------------ [2014-06-21 18:33:45] imbolk at gmail dot com Try to execute var_dump($GLOBALS); See how it crash? No? ------------------------------------------------------------------------ [2014-06-21 18:20:32] johannes@php.net This is a "normal" stackoverflow due to infinite recursion - $GLOBALS includes $a so $a's debugInfo is called over and over again. ------------------------------------------------------------------------ [2014-06-21 17:50:34] imbolk at gmail dot com Description: ------------ Crush in __debugInfo then $GLOBALS returned. Test script: --------------- class A { public function __debugInfo() { return $GLOBALS; } } $a = new A; var_dump($a); Expected result: ---------------- $GLOBALS output. Actual result: -------------- core dumped ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67491&edit=1

« previous php.bugs (#186314) next »