3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
0.40234375MB 2.3725357055664MB
Output for 8.1.0 - 8.1.28
0.40263366699219MB 2.3728332519531MB
Output for 8.0.0 - 8.0.30
0.40248107910156MB 2.3723907470703MB
Output for 7.4.0 - 7.4.33
0.40264892578125MB 2.3726806640625MB
Output for 7.3.0 - 7.3.33
0.40244293212891MB 2.3726043701172MB
Output for 7.2.0 - 7.2.33
0.39815521240234MB 2.3689651489258MB
Output for 7.1.25
0.36312103271484MB 2.3340225219727MB
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7 - 7.1.20
0.36318969726562MB 2.3340911865234MB
Output for 7.1.5 - 7.1.6
0.36318969726562MB 2.3342514038086MB
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.0.5, 5.1.0 - 5.1.6, 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.3.11, 4.4.0 - 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 />

preferences:
230.19 ms | 401 KiB | 361 Q