3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function to_int32($value) { $intval = hexdec($value); // If 64 bit if (PHP_INT_SIZE === 8) { return ($intval - 0x100000000); } // 32 bit return $intval; } echo to_int32('c0f672d4');
Output for 4.4.0 - 4.4.9, 5.0.5 - 7.1.0
-1057590572
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
Notice: Use of undefined constant PHP_INT_SIZE - assumed 'PHP_INT_SIZE' in /in/GSOYT on line 7 3237376724