?php /* hexdec.php */
/* 4.1.0 branch hexdec not compatible
* with earlier PHP releases.
*/
/*
% php4.0.0 -f hexdec.php
lemon = 5d08374e = 1560819534
pineapple = a7e9b7d0 = -1477855280
fruit = c10d50e3 = -1056091933
sausage = 42d08254 = 1120961108
breakfast = f7d7b86e = -136857490
coconut =
hi,
the current behavious is more connect than the old one.
we automagiacally propagate from in to float in the conversion
routines once we gent an overflow. to get the old bahaviour
in your case you need to case the result of hexdec() to int:
$dec = (int) hexdec($hex);