Skip to content

Instantly share code, notes, and snippets.

@jayzeng
Last active December 14, 2015 11:38
Show Gist options
  • Save jayzeng/5080225 to your computer and use it in GitHub Desktop.
Save jayzeng/5080225 to your computer and use it in GitHub Desktop.
hex to decimal in php
<?php
// hex
var_dump(0x9fa0ff0b);
// 5.2.1 (32bit)
// PHP truncates the long
int(2147483647)
// 5.2.3+ (32bit)
// overflows (naturally)
int(2678128395)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment