3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class segfault { private static $id = 0; public $name; public function __construct() { self::$id++; $this->name = getclass.'-'.self::$id; } } function string_sfault($s) { echo $s.': '.strlen($s).PHP_EOL; } $stack = array() for($i=0;$i<101;$i++) { $sf = new segfault(); $stack[] = $sf; string_sfault($sf); } ?>
Output for 5.4.0 - 5.5.8
Parse error: syntax error, unexpected 'for' (T_FOR) in /in/7409l on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FOR in /in/7409l on line 18
Process exited with code 255.