Reputation: 3622
How do I get the proper Hexadecimal number from a Hexadecimal string?
For example:
<?php
$a = 'C8';
$b = 0xC8;
$c = doWhatHere($a);
$b === $c; // true
Upvotes: 1
Views: 64
Reputation: 3622
Thanks to @Ryan.
This does the Trick:
<?php
$a = 'C8';
$b = 0xC8;
$c = intval($a, 16);
$b === $c; // true
Upvotes: 2