3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sendHttpStatus(int $statusCode, string $message) { echo $statusCode. ' ' .$message; } function sendHttpStatus(string $statusCode, string $message) { echo 'string: ' .$statusCode. ' ' .$message; } sendHttpStatus(404, "File Not Found"); // integer and string passed sendHttpStatus("403", "OK"); // string "403" coerced to int(403)
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Fatal error: Cannot redeclare sendHttpStatus() (previously declared in /in/PI2ha:3) in /in/PI2ha on line 9
Process exited with code 255.

preferences:
167.91 ms | 1395 KiB | 23 Q