3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function (int $errno, string $msg) { require __DIR__.'/b.php'; echo 'error handler called: ', $msg; }); $code = '<?php class _ {};'; $tokens = token_get_all($code, \TOKEN_PARSE); echo "\n\n"; foreach ($tokens as $token) { if (is_string($token)) { echo $token, "\n"; } else { echo token_name($token[0]) . ' "' . $token[1], "\"\n"; } }
Output for git.master_jit, git.master
T_OPEN_TAG "<?php " T_CLASS "class" T_WHITESPACE " " T_STRING "_" T_WHITESPACE " " { } ;

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:
49.97 ms | 841 KiB | 4 Q