3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo memory_get_peak_usage()/(1024*1024) . 'MB', "\n"; $pass = str_repeat('a', 1024 * 1024 * 2); $pass . $pass; echo memory_get_peak_usage()/(1024*1024) . 'MB';
Output for 7.0.0 - 7.1.0
0.36325073242188MB 6.338020324707MB
Output for hhvm-3.10.0 - 3.13.2
2MB 2MB
Output for 5.6.0 - 5.6.28
0.21044921875MB 6.2083206176758MB
Output for 5.5.0 - 5.5.38
0.21044921875MB 6.2082748413086MB
Output for 5.4.10 - 5.4.45
0.21038818359375MB 6.2087554931641MB
Output for 5.4.0 - 5.4.9
0.20988464355469MB 6.208251953125MB
Output for 5.3.11 - 5.3.29
0.597900390625MB 6.5931091308594MB
Output for 5.3.0 - 5.3.10
0.59761047363281MB 6.5928192138672MB
Output for 5.2.10 - 5.2.17
0.079917907714844MB 6.0752410888672MB
Output for 5.2.7 - 5.2.9
0.079948425292969MB 6.0752716064453MB
Output for 5.2.3 - 5.2.6
0.080253601074219MB 6.0755767822266MB
Output for 5.2.2
0.078147888183594MB 6.0735702514648MB
Output for 5.2.1
0.078147888183594MB 6.0736312866211MB
Output for 5.0.0 - 5.2.0
Fatal error: Call to undefined function memory_get_peak_usage() in /in/i3668 on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i3668 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i3668 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/i3668 on line 2