3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sendHttpStatus(int $statusCode, string $message) { header('HTTP/1.0 ' .$statusCode. ' ' .$message); } sendHttpStatus(404, "File Not Found"); // integer and string passed sendHttpStatus("403", "OK"); // string "403" coerced to int(403)

preferences:
46.81 ms | 402 KiB | 5 Q