3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = 3; $parity = $b = 0; $parity = $num & 1; $b += $parity; $b += $num & 2 ? 1 : 0; $b += $num & 4 ? 1 : 0; $b += $num & 8 ? 1 : 0; $b += $num & 16 ? 1 : 0; $b += $num & 32 ? 1 : 0; $b += $num & 64 ? 1 : 0; printf("Num: %d\nBits on: %d\nParity: %d", $num, $b, $parity);
Output for rfc.property-hooks, git.master, git.master_jit
Num: 3 Bits on: 2 Parity: 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:
42.88 ms | 2092 KiB | 4 Q