3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass = str_repeat('a', 1024 * 512); echo strlen($pass . $pass), "\n"; echo memory_get_peak_usage(), "\n", memory_get_peak_usage()/(1024*1024) . 'MB';
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
1048576 1967536 1.8763885498047MB
Output for 8.1.0 - 8.1.27
1048576 1967848 1.8766860961914MB
Output for 8.0.0 - 8.0.30
1048576 1967384 1.8762435913086MB
Output for 7.4.0 - 7.4.33
1048576 1967688 1.8765335083008MB
Output for 7.3.12 - 7.3.33
1048576 1967608 1.8764572143555MB
Output for 7.2.29 - 7.2.33
1048576 1963760 1.8727874755859MB
Output for 7.2.0 - 7.2.6
1048576 1963800 1.8728256225586MB
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7 - 7.1.20
1048576 1927192 1.8379135131836MB
Output for 7.1.5 - 7.1.6
1048576 1927360 1.8380737304688MB
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28
1048576 1791080 1.7081069946289MB
Output for 5.4.10 - 5.4.45
1048576 1791544 1.7085494995117MB
Output for 5.4.0 - 5.4.9
1048576 1791016 1.7080459594727MB
Output for 5.3.11 - 5.3.29
1048576 2194584 2.0929183959961MB
Output for 5.3.0 - 5.3.10
1048576 2194280 2.0926284790039MB
Output for 5.2.10 - 5.2.17
1048576 1651640 1.5751266479492MB
Output for 5.2.7 - 5.2.9
1048576 1651672 1.5751571655273MB
Output for 5.2.3 - 5.2.6
1048576 1651992 1.5754623413086MB
Output for 5.2.1 - 5.2.2
1048576 1649920 1.573486328125MB
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
1048576 <br /> <b>Fatal error</b>: Call to undefined function memory_get_peak_usage() in <b>/in/anKE7</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.4.5 - 4.4.9
1048576 <br /> <b>Fatal error</b>: Call to undefined function: memory_get_peak_usage() in <b>/in/anKE7</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
1048576 <br /> <b>Fatal error</b>: Call to undefined function: memory_get_peak_usage() in <b>/in/anKE7</b> on line <b>6</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
1048576 <br /> <b>Fatal error</b>: Call to undefined function: memory_get_peak_usage() in <b>/in/anKE7</b> on line <b>6</b><br />

preferences:
206.86 ms | 401 KiB | 345 Q