PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. <<__EntryPoint>>
  3. function main_chr_invalid_type() {
  4. $inputs = varray[
  5. -1, 0, 1, 2, 128, 255,
  6. "0string", "1string", "2",
  7. varray[], varray[1], varray[1,2],
  8. new stdClass,
  9. new SimpleXMLElement("<foo />"),
  10. new SimpleXMLElement("<foo><bar/></foo>"),
  11. fopen(__FILE__, 'r'),
  12. ];
  13. foreach ($inputs as $v) {
  14. var_dump(bin2hex(chr($v)));
  15. }
  16. }