3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($_, $errstr) use ($pattern) { restore_error_handler(); echo 'handler:' . var_export($errstr, true) . \PHP_EOL; }); echo 'execution:' . \var_export(\preg_match('//u', "\xc3\x28"), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL; echo 'compilation:' . \var_export(\preg_match('/(/', 'a'), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL; \restore_error_handler(); echo 'ok:' . var_export(\preg_match('/./', 'a'), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $pattern in /in/2mqev on line 3 execution:false error:4 handler:'preg_match(): Compilation failed: missing closing parenthesis at offset 1' compilation:false error:1 ok:1 error:0

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:
62.64 ms | 401 KiB | 8 Q