3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $legit_id = pack("C*10", ord('3'), 0, 0, 0, 0, 0, 0, 0, 0, 38); var_dump($legit_id); var_dump(check_input_data($legit_id, 'int')); function check_input_data($data, $type) { if (preg_match('/^[0-9]{1,10}$/D', $data) && $data < 2147483647) return true; }
based on calXi
Output for 4.3.2 - 5.6.21, 7.0.0 - 7.1.0
Warning: pack(): Type 1: unknown format code in /in/U8dru on line 3 bool(false) NULL
Output for hhvm-3.12.0
Warning: Invalid argument: Type 1: unknown format code in /in/U8dru on line 3 bool(false) NULL
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.3.1
Warning: pack() [http://www.php.net/function.pack]: Type 1: unknown format code in /in/U8dru on line 3 bool(false) NULL