PHP: str_repeat - Manual - PHP: Hypertext Preprocessor
str_repeat does not repeat symbol with code 0 on some (maybe all?) systems (tested on PHP Version 4.3.2 , FreeBSD 4.8-STABLE i386 ). Use while(strlen($str) < $desired) $str .= chr(0); to have string filled with zero-symbols....