3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sendHttpStatus(int $statusCode, string $message): bool { echo $statusCode. ' ' .$message; } sendHttpStatus(404, "File Not Found"); // integer and string passed sendHttpStatus("403", "OK"); // string "403" coerced to int(403)
Output for git.master, git.master_jit, rfc.property-hooks
404 File Not Found Fatal error: Uncaught TypeError: sendHttpStatus(): Return value must be of type bool, none returned in /in/IHA6v:5 Stack trace: #0 /in/IHA6v(7): sendHttpStatus(404, 'File Not Found') #1 {main} thrown in /in/IHA6v on line 5
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
66.94 ms | 401 KiB | 8 Q