3v4l.org

run code in 300+ PHP versions simultaneously
<?php $masks = [1,2,4,8,16,32,64]; $num = 0x07; // get the parity bit $pBit = $num & 1; // shift it off $num = $num >> 1; $p = 0; echo "Num is $num\n"; foreach ($masks as $mask){ if ($mask & $num){ $p++; } } echo "On Bits = $p\n"; echo "Paroty Should be ".($p%2?0:1)."\n"; echo "Actual $pBit \n";
Output for git.master, git.master_jit, rfc.property-hooks
Num is 3 On Bits = 2 Paroty Should be 1 Actual 1

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:
88.72 ms | 2205 KiB | 4 Q