<?php
function dec2hex($number)
{
$number = sprintf('%0.0f', $number);
$hexvalues = array('0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F');
$hexval = '';
while($number != '0')
{
$hexval = $hexvalues[bcmod($number,'16')].$hexval;
$number = bcdiv($number,'16',0);
}
return $hexval;
}
$id = 14910855968770314426;
var_dump($id);
var_dump(
$guid = dec2hex($id);
var_dump($guid);
- Output for 5.3.0 - 5.3.24, 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected ';' in k83Zu on line 20
Process exited with code 255. - Output for 5.3.25
- Parse error: syntax error, unexpected ';' in /in/Kq45e on line 20
Process exited with code 255.
preferences:
192.85 ms | 1395 KiB | 49 Q