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); $ab = get_error_handler(); set_error_handler(function() use ($ab) { $ab(); print 123;} ); echo $a;
Output for rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 0 passed in /in/jTiNL on line 27 and exactly 4 expected in /in/jTiNL:13 Stack trace: #0 /in/jTiNL(27): {closure}() #1 /in/jTiNL(32): {closure}(2, 'Undefined varia...', '/in/jTiNL', 32) #2 {main} thrown in /in/jTiNL on line 13
Process exited with code 255.
Output for git.master, git.master_jit
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure:/in/jTiNL:13}(), 0 passed in /in/jTiNL on line 27 and exactly 4 expected in /in/jTiNL:13 Stack trace: #0 /in/jTiNL(27): {closure:/in/jTiNL:13}() #1 /in/jTiNL(32): {closure:/in/jTiNL:23}(2, 'Undefined varia...', '/in/jTiNL', 32) #2 {main} thrown in /in/jTiNL on line 13
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:
54.68 ms | 2786 KiB | 4 Q