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"; } }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
150.6 ms | 1469 KiB | 13 Q