- var_dump: documentation ( source)
- base_convert: documentation ( source)
- printf: documentation ( source)
<?php
$a = 0x40;
$b = ~$a; // flip bits, i.e. 2s complement so -$a and then minus 1
var_dump("var_dump: $b"); // -65
printf("\nprintf: %d\n\n", $b);
var_dump( base_convert($b, 10, 2) ); // 65
// **************************//
// should be:
printf("\nprintf: %b\n\n", $b);
echo hexbin(0x40);