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); echo memory_get_peak_usage()/(1024*1024) . 'MB';
Output for 7.0.0 - 7.1.0
0.36318969726562MB 2.3340911865234MB
Output for hhvm-3.10.0 - 3.12.0
2MB 2MB
Output for 5.6.0 - 5.6.28
0.21044921875MB 2.2082061767578MB
Output for 5.5.0 - 5.5.35
0.21044921875MB 2.2081604003906MB
Output for 5.4.10 - 5.4.45
0.21038818359375MB 2.2086410522461MB
Output for 5.4.0 - 5.4.9
0.20988464355469MB 2.208137512207MB
Output for 5.3.11 - 5.3.29
0.597900390625MB 2.5928573608398MB
Output for 5.3.0 - 5.3.10
0.59761047363281MB 2.5925674438477MB
Output for 5.2.10 - 5.2.17
0.079917907714844MB 2.0749893188477MB
Output for 5.2.7 - 5.2.9
0.079948425292969MB 2.0750198364258MB
Output for 5.2.3 - 5.2.6
0.080253601074219MB 2.075325012207MB
Output for 5.2.2
0.078147888183594MB 2.0733184814453MB
Output for 5.2.1
0.078147888183594MB 2.0733795166016MB
Output for 5.0.0 - 5.2.0
<br /> <b>Fatal error</b>: Call to undefined function memory_get_peak_usage() in <b>/in/nr3f5</b> on line <b>2</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_peak_usage() in <b>/in/nr3f5</b> on line <b>2</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_peak_usage() in <b>/in/nr3f5</b> on line <b>2</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_peak_usage() in <b>/in/nr3f5</b> on line <b>2</b><br />