3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('OBJECT_COUNT', 9999); class Object { private static $world = array(); private static $maxGuid = 0; protected $_guid = null; public function __construct() { self::$world[$this->_guid = self::$maxGuid++] = $this; } public function __destruct() { unset(self::$world[$this->_guid]); } } for ($i = 0; $i < OBJECT_COUNT; ++$i) { new Object(); } // You probably won't see this because of the "zend_mm_heap corrupted" echo 'If you see this, try to increase OBJECT_COUNT to 100,000'; ?>
Output for 5.0.0 - 5.2.17, 5.3.11 - 5.3.29, 5.4.20 - 5.4.45, 5.5.4 - 7.1.0
If you see this, try to increase OBJECT_COUNT to 100,000
Output for 5.3.0 - 5.3.10, 5.4.0 - 5.4.10, 5.4.12 - 5.4.19, 5.5.0 - 5.5.3
If you see this, try to increase OBJECT_COUNT to 100,000zend_mm_heap corrupted
Process exited with code 1.
Output for 5.4.11
If you see this, try to increase OBJECT_COUNT to 100,000
Process exited with code 139.
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/uvTia on line 6
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/uvTia on line 6
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/uvTia on line 6
Process exited with code 255.