3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function sendHttpStatus(int $statusCode, string $message) { echo $statusCode. ' ' .$message; } sendHttpStatus(404, "File Not Found"); // integer and string passed sendHttpStatus("403", "OK"); // string "403" coerced to int(403)
based on ITX3u
Output for 7.0.0 - 7.2.0
404 File Not Found403 OK
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to sendHttpStatus() must be an instance of int, integer given, called in /in/LJrRR on line 7 and defined in /in/LJrRR on line 3
Process exited with code 255.