3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable = range(1, 1000); echo memory_get_peak_usage(true), PHP_EOL; function foo($var) { return is_array($var); } foo($variable); echo memory_get_peak_usage(true);
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
2097152 2097152

preferences:
142.94 ms | 403 KiB | 139 Q