3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Executor { public function execute(callable $function) { set_error_handler([$this, 'errorHandler']); var_dump($function()); restore_error_handler(); } private function errorHandler(int $type, string $message, string $file, int $line): bool { return true; } private function restoreErrorHandler(): void { } } $cb = function() { return password_hash(1234); }; (new Executor())->execute($cb);

preferences:
35.24 ms | 402 KiB | 5 Q