3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nibble1 = hexdec('3'); $nibble2 = hexdec('a'); // nibble1 xnor nibble2 $r = ~($nibble1 ^ $nibble2) & 0x0F; echo dechex($r); // '6'
based on E7iUb
Output for 7.3.0 - 7.3.28, 7.4.0 - 7.4.16, 8.0.0 - 8.0.3
6