3v4l.org

run code in 300+ PHP versions simultaneously
<?php $responseCode = 0; function validate($n) { return $n; } function responseFromCode($code) { if ($code == 100) { return '{"status":100, "status_text":"Invalid User"}'; } if ($code == 200) { return '{"status":200, "status_text":"Invalid Company"}'; } if ($code == 300) { return '{"status":300, "status_text":"Feature Not enabled"}'; } return '{"status":400, "status_text":"Internal Error"}'; } $responseCode=validate(100); echo $responseCode; if ($responseCode != 1) { echo jsonresponseFromCode($responseCode); } else { echo "validated"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
100 Fatal error: Uncaught Error: Call to undefined function jsonresponseFromCode() in /in/PAXQW:25 Stack trace: #0 {main} thrown in /in/PAXQW on line 25
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:
39.47 ms | 401 KiB | 8 Q