3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function myfunction($array){var_dump(memory_get_usage());} $array = range(1,1000000); var_dump(memory_get_usage()); myfunction($array);
Output for 7.0.0 - 7.1.0
int(33905088) int(33905120)
Output for hhvm-3.10.0 - 3.12.0
int(4194304) int(4194304)
Output for 5.5.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/tH64F on line 4
Process exited with code 255.
Output for 5.3.0 - 5.4.45
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /in/tH64F on line 4
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /in/tH64F on line 4
Process exited with code 255.
Output for 5.2.1 - 5.2.2
<br /> <b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in <b>/in/tH64F</b> on line <b>4</b><br />
Process exited with code 255.
Output for 5.0.0 - 5.2.0
<br /> <b>Fatal error</b>: Call to undefined function memory_get_usage() in <b>/in/tH64F</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/tH64F</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/tH64F</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: memory_get_usage() in <b>/in/tH64F</b> on line <b>5</b><br />