3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '2K'); //$y = str_repeat("x", 1000); set_error_handler(function() { //global $y; //$y = ''; print 'Ahh, there is a fatal'; //print memory_get_usage(); }); register_shutdown_function(function() { print memory_get_usage(); print 'Shutdown'; }); //print memory_get_usage(); $x = str_repeat("x", 2*1024*1024);

preferences:
27.24 ms | 402 KiB | 5 Q