3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('OBJECT_COUNT', 130000); 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.0, 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.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.0 - 5.4.19
If you see this, try to increase OBJECT_COUNT to 100,000
Process exited with code 139.
Output for 5.3.11 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 64 bytes) in /in/e95Vs on line 17
Process exited with code 255.
Output for 5.2.1 - 5.2.5, 5.3.0 - 5.3.10
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/e95Vs on line 9
Process exited with code 255.
Output for 5.2.6, 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/e95Vs on line 17
Process exited with code 139.
Output for 5.2.7 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/e95Vs on line 17
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/e95Vs 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/e95Vs 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/e95Vs on line 5
Process exited with code 255.