3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$DXPcmd = array(0x55,0x82,0x10,0x31,0x00,0x51,0x96); $DXPcmd = array(0x55,0x82,0x10,0x31,0x00,0x51); $DXPcmd = "558210310051"; $SUM=0; for ($i=0; $i < strlen($DXPcmd)-1; $i+=2){ $SUM += hexdec($DXPcmd[$i].$DXPcmd[$i+1]); } $NOTSUM = ~$SUM; echo dechex($NOTSUM); $CHKSUM = bin2hex(dec2bin($NOTSUM) & dec2bin(3)); echo dechex($CHKSUM); ?>
based on ADi5C
Output for 7.0.0 - 7.2.0
fffffffffffffe96 Fatal error: Uncaught Error: Call to undefined function dec2bin() in /in/nRMVh:13 Stack trace: #0 {main} thrown in /in/nRMVh on line 13
Process exited with code 255.
Output for 5.3.22 - 5.6.28
fffffffffffffe96 Fatal error: Call to undefined function dec2bin() in /in/nRMVh on line 13
Process exited with code 255.