3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set("display_errors","On"); error_reporting(E_ALL); function without($var){ echo "Certain death\n"; echo memory_get_usage(), PHP_EOL; } function with(&$var){ echo "Alive\n"; echo memory_get_usage(), PHP_EOL; } $str = str_repeat('foo', 100000); echo memory_get_usage(), PHP_EOL; echo "END\n"; with($str); without($str);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.27 ms | 2434 KiB | 16 Q