3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass = str_repeat('a', 1024 * 512); $pass . $pass; 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
1967536 1.8763885498047MB
Output for 8.1.0 - 8.1.28
1967848 1.8766860961914MB
Output for 8.0.0 - 8.0.30
1967384 1.8762435913086MB
Output for 7.4.0 - 7.4.33
1967688 1.8765335083008MB
Output for 7.3.0 - 7.3.33
1967608 1.8764572143555MB
Output for 7.2.0 - 7.2.33
1963760 1.8727874755859MB
Output for 7.1.25
1927120 1.8378448486328MB
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7 - 7.1.20
1927192 1.8379135131836MB
Output for 7.1.5 - 7.1.6
1927328 1.8380432128906MB
Output for 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
1790808 1.7078475952148MB
Output for 5.4.10 - 5.4.45
1791272 1.7082901000977MB
Output for 5.4.0 - 5.4.9
1790744 1.7077865600586MB
Output for 5.3.11 - 5.3.29
2194160 2.0925140380859MB
Output for 5.3.0 - 5.3.10
2193856 2.0922241210938MB
Output for 5.2.10 - 5.2.17
1651216 1.5747222900391MB
Output for 5.2.7 - 5.2.9
1651248 1.5747528076172MB
Output for 5.2.3 - 5.2.6
1651568 1.5750579833984MB
Output for 5.2.1 - 5.2.2
1649496 1.5730819702148MB
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
Fatal error: Call to undefined function memory_get_peak_usage() in /in/OhLIh on line 6
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/OhLIh on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: memory_get_peak_usage() in /in/OhLIh on line 6
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/OhLIh on line 6

preferences:
226.89 ms | 401 KiB | 330 Q