3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // PHP 5.4 $data = "hoge" // PHP 5.5 $data = "hoge\0\0" var_dump($data = unpack('a1b/a1c', $packed)); // PHP 5.5 $data = "hoge" var_dump($data = unpack('Z6', $packed));
based on PMGX1
Output for 5.5.24 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack(): Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 Warning: unpack(): Type Z: not enough input, need 6, have 0 in /in/lvclK on line 9 bool(false)
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: Invalid argument: Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 Warning: Invalid argument: Type Z: not enough input, need 6, have 0 in /in/lvclK on line 9 bool(false)
Output for 5.2.4 - 5.4.45
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack(): Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 Warning: unpack(): Invalid format type Z in /in/lvclK on line 9 bool(false)
Output for 5.0.4 - 5.2.3
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack(): Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 array(0) { }
Output for 4.3.2 - 4.4.7, 5.0.0 - 5.0.3
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack(): Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 array(0) { }
Output for 4.4.8 - 4.4.9
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack(): Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 Warning: unpack(): Invalid format type Z in /in/lvclK on line 9 bool(false)
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: packed in /in/lvclK on line 6 Warning: unpack() [http://www.php.net/function.unpack]: Type a: not enough input, need 1, have 0 in /in/lvclK on line 6 bool(false) Notice: Undefined variable: packed in /in/lvclK on line 9 array(0) { }