- var_dump: documentation ( source)
- base_convert: documentation ( source)
<?php
$a = 0x40;
var_dump($a); // 64
var_dump(base_convert($a, 16, 2)); // But 64hex == 100101000 or 296 b/c passing effectively 64 in base 16 to convert to base 2
var_dump(base_convert(40, 16, 2)); // 64 b/c 40 in base 16 == 64 decimal == 10000000 or 2 ** 6