3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mem_start = memory_get_usage(true); echo 'start: ' . $mem_start . PHP_EOL; $max_iterations = 10000; for ($i = 1; $i <= $max_iterations; $i++) { DateTime::createFromFormat('M/D/Y H:i:s', '2013-11-12 20:00:00'); if (($i % 1000) == 0) { echo $i . '.: ' . memory_get_usage(true) . PHP_EOL; } } $mem_end = memory_get_usage(true); echo 'end: ' . $mem_end . PHP_EOL; echo 'diff end-start: ' . ($mem_end - $mem_start) . PHP_EOL;
Output for 7.0.0 - 7.1.0
start: 2097152 1000.: 2097152 2000.: 2097152 3000.: 2097152 4000.: 2097152 5000.: 2097152 6000.: 2097152 7000.: 2097152 8000.: 2097152 9000.: 2097152 10000.: 2097152 end: 2097152 diff end-start: 0
Output for hhvm-3.12.0
start: 303032 1000.: 305240 2000.: 305272 3000.: 305304 4000.: 305304 5000.: 305304 6000.: 305304 7000.: 305304 8000.: 305304 9000.: 305304 10000.: 305320 end: 305272 diff end-start: 2240
Output for hhvm-3.10.0
start: 301376 1000.: 303600 2000.: 303632 3000.: 303664 4000.: 303664 5000.: 303664 6000.: 303664 7000.: 303664 8000.: 303664 9000.: 303664 10000.: 303680 end: 303632 diff end-start: 2256
Output for 5.4.34 - 5.4.45, 5.5.18 - 5.6.28
start: 262144 1000.: 262144 2000.: 262144 3000.: 262144 4000.: 262144 5000.: 262144 6000.: 262144 7000.: 262144 8000.: 262144 9000.: 262144 10000.: 262144 end: 262144 diff end-start: 0
Output for 5.4.0 - 5.4.32, 5.5.0 - 5.5.16
start: 262144 1000.: 524288 2000.: 524288 3000.: 1048576 4000.: 1048576 5000.: 1310720 6000.: 1572864 7000.: 1572864 8000.: 1572864 9000.: 2097152 10000.: 2359296 end: 2359296 diff end-start: 2097152
Output for 5.3.0 - 5.3.29
start: 786432 1000.: 1048576 2000.: 1310720 3000.: 1835008 4000.: 2097152 5000.: 2621440 6000.: 2883584 7000.: 3145728 8000.: 3145728 9000.: 3932160 10000.: 4194304 end: 4194304 diff end-start: 3407872
Output for 5.2.10 - 5.2.17
start: 262144 Fatal error: Call to undefined method DateTime::createFromFormat() in /in/4JqcT on line 7
Process exited with code 255.
Output for 5.2.1 - 5.2.9
start: 262144 Fatal error: Call to undefined method DateTime::createfromformat() in /in/4JqcT on line 7
Process exited with code 255.
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_usage() in /in/4JqcT on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_usage() in /in/4JqcT on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_usage() in /in/4JqcT on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_usage() in /in/4JqcT on line 2