1--TEST-- 2Bug #61038: unpack("a5", "str\0\0") does not work as expected 3--FILE-- 4<?php 5var_dump(unpack("a4", "str\0\0")); 6var_dump(unpack("a5", "str\0\0")); 7var_dump(unpack("a6", "str\0\0")); 8var_dump(unpack("a*", "str\0\0")); 9?> 10--EXPECTF-- 11array(1) { 12 [1]=> 13 string(4) "str%c" 14} 15array(1) { 16 [1]=> 17 string(5) "str%c%c" 18} 19 20Warning: unpack(): Type a: not enough input, need 6, have 5 in %s on line %d 21bool(false) 22array(1) { 23 [1]=> 24 string(5) "str%c%c" 25} 26 27