3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = []; for ($i = 0; $i < 100000; $i++) { $list[] = $i; } var_dump(memory_get_peak_usage() / 1024 / 1024);
Output for 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
float(2.373077392578125)
Output for 8.1.0 - 8.1.30
float(4.373374938964844)
Output for 8.0.1 - 8.0.30
float(4.372962951660156)

preferences:
67.6 ms | 408 KiB | 5 Q