3v4l.org

run code in 300+ PHP versions simultaneously
<?php unset($_GET["action"]); echo "value: "; var_dump($_GET["action"] ?? NULL); echo "test: "; var_dump(($_GET["action"] ?? NULL) === "submit"); echo "branch: "; if (($_GET["action"] ?? NULL) === "submit") { echo "submit"; } else { echo "not submit"; } echo PHP_EOL; echo PHP_EOL; $_GET["action"] = "submit"; echo "value: "; var_dump($_GET["action"] ?? NULL); echo "test: "; var_dump(($_GET["action"] ?? NULL) === "submit"); echo "branch: "; if (($_GET["action"] ?? NULL) === "submit") { echo "submit"; } else { echo "not submit"; } echo PHP_EOL; echo PHP_EOL; $_GET["action"] = "preview"; echo "value: "; var_dump($_GET["action"] ?? NULL); echo "test: "; var_dump(($_GET["action"] ?? NULL) === "submit"); echo "branch: "; if (($_GET["action"] ?? NULL) === "submit") { echo "submit"; } else { echo "not submit"; } echo PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
value: NULL test: bool(false) branch: not submit value: string(6) "submit" test: bool(true) branch: submit value: string(7) "preview" test: bool(false) branch: not submit

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:
131.45 ms | 405 KiB | 5 Q