3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Symfony\Component\HttpKernel\Exception\HttpException; class OrderNotFound extends HttpException { public static function create(string $id): self { return new self( statusCode: Response::HTTP_NOT_FOUND, message: sprintf('The order "%s" could not be found.', $id), headers: ['x-header' => 'foo'], ); } }

preferences:
53.13 ms | 404 KiB | 5 Q