3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ [1, 1], [0, 1], [0, 2], ]; foreach ($options as $val) { $a = $val[0] || $val[1]; $b = $val[0] ?: (bool) $val[1]; $c = (bool)($val[0] ?: $val[1]); echo "Trying {$val[0]}:{$val[1]} -> \n"; var_dump($a, $b, $c); echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Trying 1:1 -> bool(true) int(1) bool(true) Trying 0:1 -> bool(true) bool(true) bool(true) Trying 0:2 -> bool(true) bool(true) bool(true)

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:
41.88 ms | 401 KiB | 8 Q