circular crash testcase
| From: | waldschrott | Date: | Mon, 14 Aug 2000 13:38:41 +0000 |
| Subject: | circular crash testcase | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-28814@lists.php.net to get a copy of this message | ||
Hi Andi,
you have complained about that strange code, here is a "light" version crashing my W2K system.
I´ve also attached (in my eyes) equivalent non-crashing code.
Have fun ;)
Crash code:
<?php
class a { }
class b {
function b(&$obj) {
$this->a=&$obj;
$this->a->b=&$this; }}
$a=new a;
$b=new b($a);
?>
//var_dump($b);
Equivalent non-crash code:
<?php
class a { }
class b {}
$a=new a;
$b=new b;
$a->b=&$b;
$a->b->a=&$a;
//var_dump($a);
?>
--
o----------0-¬---------O-·---¬----o---®-----o o O ° .
| http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ °
·
0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ °
o © ° . ·
| psychedelic experience | gott@kiffen.de | O ° o °
o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·