3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Source: https://bugs.php.net/bug.php?id=62500 class Crasher extends DateInterval { public function __construct($time_spec) { echo "Yes i did it, with the next statement it gives a segfault\n"; // It doesn't matter if we take the y parameter or any other. $this->y = 3; } } $c = new Crasher('blah');
Output for 5.3.16 - 5.3.29, 5.4.6 - 5.6.28, 7.0.0 - 7.1.0
Yes i did it, with the next statement it gives a segfault
Output for 5.3.0 - 5.3.15, 5.4.0 - 5.4.5, hhvm-3.10.0 - 3.12.0
Yes i did it, with the next statement it gives a segfault
Process exited with code 139.
Output for 5.0.0 - 5.2.17
Fatal error: Class 'DateInterval' not found in /in/B8N1f on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/B8N1f on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/B8N1f on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/B8N1f on line 5
Process exited with code 255.