3v4l.org

run code in 500+ PHP versions simultaneously
<?php if (!function_exists('get_error_handler')) { function noop_error_handler() { } function get_error_handler(): ?callable { $handler = set_error_handler('noop_error_handler'); restore_error_handler(); return $handler; } } $handler = function (int $errno, string $errstr, ?string $errfile, ?int $errline) { echo "Error: " . $errstr . "\n"; }; set_error_handler($handler); set_error_handler(function() { $a = get_error_handler(); $a(); print 123;} ); echo $a;
Output for rfc.property-hooks
Fatal error: Uncaught Error: Value of type null is not callable in /in/3qZKm:23 Stack trace: #0 /in/3qZKm(27): {closure}(2, 'Undefined varia...', '/in/3qZKm', 27) #1 {main} thrown in /in/3qZKm on line 23
Process exited with code 255.
Output for git.master, git.master_jit
Fatal error: Uncaught Error: Value of type null is not callable in /in/3qZKm:23 Stack trace: #0 /in/3qZKm(27): {closure:/in/3qZKm:21}(2, 'Undefined varia...', '/in/3qZKm', 27) #1 {main} thrown in /in/3qZKm on line 23
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
60.22 ms | 2749 KiB | 4 Q