3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shutdonw = function() { print 'Shutdown'; }; set_error_handler(function() { print memory_get_usage().PHP_EOL; $y = str_repeat("x", 2*1024*1024); print memory_get_usage(); print 'Ahh, there is a fatal'; global $shutdown; $shutdown(); }); register_shutdown_function($shutdown); ini_set('memory_limit', '1K'); $x = str_repeat("x", 2*1024*1024);
Output for 7.2.0
387888 2489192Ahh, there is a fatal Fatal error: Uncaught Error: Function name must be a string in /in/llLHn:13 Stack trace: #0 /in/llLHn(17): {closure}(8, 'Undefined varia...', '/in/llLHn', 17, Array) #1 {main} thrown in /in/llLHn on line 13
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0, 7.1.7
351080 2452384Ahh, there is a fatal Fatal error: Uncaught Error: Function name must be a string in /in/llLHn:13 Stack trace: #0 /in/llLHn(17): {closure}(8, 'Undefined varia...', '/in/llLHn', 17, Array) #1 {main} thrown in /in/llLHn on line 13
Process exited with code 255.
Output for 7.1.5 - 7.1.6
351496 2452800Ahh, there is a fatal Fatal error: Uncaught Error: Function name must be a string in /in/llLHn:13 Stack trace: #0 /in/llLHn(17): {closure}(8, 'Undefined varia...', '/in/llLHn', 17, Array) #1 {main} thrown in /in/llLHn on line 13
Process exited with code 255.
Output for 5.6.0 - 5.6.28
221464 2318736Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 5.5.0 - 5.5.38
221464 2318720Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 5.4.0 - 5.4.45
221952 2319208Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 5.3.11 - 5.3.29
625912 2723168Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 5.3.1 - 5.3.10
625608 2722864Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 5.3.0
625592 2722848Ahh, there is a fatal Fatal error: Function name must be a string in /in/llLHn on line 13
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/llLHn on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/llLHn on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/llLHn on line 3
Process exited with code 255.

preferences:
147.13 ms | 401 KiB | 216 Q