/hphp/test/slow/chr-invalid-type.php
http://github.com/facebook/hiphop-php · PHP · 19 lines · 16 code · 3 blank · 0 comment · 0 complexity · 95653749f36c699de8014be369fd7894 MD5 · raw file
- <?hh
- <<__EntryPoint>>
- function main_chr_invalid_type() {
- $inputs = varray[
- -1, 0, 1, 2, 128, 255,
- "0string", "1string", "2",
- varray[], varray[1], varray[1,2],
- new stdClass,
- new SimpleXMLElement("<foo />"),
- new SimpleXMLElement("<foo><bar/></foo>"),
- fopen(__FILE__, 'r'),
- ];
- foreach ($inputs as $v) {
- var_dump(bin2hex(chr($v)));
- }
- }