3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('WARRIOR_OFFSET', 16); define('MAGE_OFFSET', 17); define('CLASS_MASK', ( 1 << WARRIOR_OFFSET ) | ( 1 << MAGE_OFFSET )); $bitmask = 8470543; $classMap = array( 0b00 => 'error', 0b01 => 'warrior', 0b10 => 'mage', 0b11 => 'seyan', ); $class = $bitmask & CLASS_MASK; $class = $class >> WARRIOR_OFFSET; $class_name = $classMap[$class]; print "$class_name\n";
Output for git.master, git.master_jit, rfc.property-hooks
warrior

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.01 ms | 401 KiB | 8 Q