3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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)
based on mNlnd
Output for 7.0.0 - 7.2.0
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/DiObI on line 7 and defined in /in/DiObI on line 3
Process exited with code 255.