3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callable = fn() => throw new Exception(); $myValue = true; $value = $myValue ? 'something' : throw new Exception(); $value = $myValue ?: throw new Exception(); $myValue = false; $value = $myValue ? throw new Exception() : 'something'; $nullableValue = 1; $value = $nullableValue ?? throw new Exception(); $value = true; $value ??= throw new Exception(); $condition = false; $condition && throw new Exception(); $condition and throw new Exception(); $condition = true; $condition || throw new Exception(); $condition or throw new Exception(); // $condition xor throw new Exception(); echo 'still executable as throw, in all of the above cases, is used as part of an expression';
Output for git.master, git.master_jit, rfc.property-hooks
still executable as throw, in all of the above cases, is used as part of an expression

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