3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DEFINED_AS_TRUE', true); define('DEFINED_AS_FALSE', false); echo 'Case A when not defined: '; if ((!THIS_IS_NOT_DEFINED) || !defined('THIS_IS_NOT_DEFINED')) { echo 'if is true'; } else { echo 'if is false'; } echo "\n\n"; echo 'Case B when not defined: '; if ((!defined('THIS_IS_NOT_DEFINED')) || (!THIS_IS_NOT_DEFINED)) { echo 'if is true'; } else { echo 'if is false'; } echo "\n\n"; echo 'Case A when defined as true: '; if ((!DEFINED_AS_TRUE) || !defined('DEFINED_AS_TRUE')) { echo 'if is true'; } else { echo 'if is false'; } echo "\n\n"; echo 'Case B when defined as true: '; if ((!defined('DEFINED_AS_TRUE')) || (!DEFINED_AS_TRUE)) { echo 'if is true'; } else { echo 'if is false'; } echo "\n\n"; echo 'Case A when defined as false: '; if ((!DEFINED_AS_FALSE) || !defined('DEFINED_AS_FALSE')) { echo 'if is true'; } else { echo 'if is false'; } echo "\n\n"; echo 'Case B when defined as false: '; if ((!defined('DEFINED_AS_FALSE')) || (!DEFINED_AS_FALSE)) { echo 'if is true'; } else { echo 'if is false'; }
Output for git.master, git.master_jit, rfc.property-hooks
Case A when not defined: Fatal error: Uncaught Error: Undefined constant "THIS_IS_NOT_DEFINED" in /in/ED6iJ:6 Stack trace: #0 {main} thrown in /in/ED6iJ on line 6
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:
45.37 ms | 401 KiB | 8 Q