3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(-1); //全てのエラーを有効にする function my_error_handler($errno, $errstr, $errfile, $errline) { echo "ERROR [$errno] $errstr\n"; echo " Error on line $errline in file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n"; echo "Aborting...\n"; /* Don't execute PHP internal error handler */ return true; } set_error_handler('my_error_handler'); function foo(int $v) { echo $v; } // 不正な数値を渡す foo('999999999999999');

preferences:
26.65 ms | 405 KiB | 5 Q