3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Stel je hebt een byte array $raw=[0xAB, 0x56, 0xFD]; //Dan per 3 bytes uitlezen in een loop for($idx=0;$idx<count($raw);$idx+=3) { //en schuiven met bits met << of >> //of gebruik maken van logical AND: & $v1 = ($raw[$idx] << 4) + ( $raw[$idx+1] >> 4); $v2 = (($raw[$idx+1] & 0xF) << 8) + $raw[$idx+2]; //resultaat, in hex voor de duidelijkheid echo dechex($v1) . " " . dechex($v2) . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
ab5 6fd

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