3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $packed = pack('h*', dechex(PHP_INT_MAX)); $v = unpack('h*', $packed); $v = hexdec($v[1]); var_dump($packed); var_dump($v);
Output for 4.4.0 - 4.4.1, 4.4.3 - 4.4.9, 5.0.5 - 5.1.1, 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(8) "��������" int(9223372036854775807)
Output for 4.4.2, 5.1.2
string(8) "��������" float(1.4757395258968E+20)
Output for 5.0.3 - 5.0.4
<br /> <b>Warning</b>: unpack() [<a href='function.unpack'>function.unpack</a>]: Type h: outside of string in <b>/in/gaOMq</b> on line <b>3</b><br /> string(1) "" int(0)
Output for 4.3.0 - 4.3.9, 4.3.11, 5.0.0 - 5.0.2
string(1) "" int(0)
Output for 4.3.10
<br /> <b>Warning</b>: unpack(): Type h: outside of string in <b>/in/gaOMq</b> on line <b>3</b><br /> string(1) "" int(0)