PageRenderTime 40ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/spec/tests/types/resource/resource_from_fopen.php

http://github.com/facebook/hiphop-php
PHP | 21 lines | 11 code | 5 blank | 5 comment | 0 complexity | f07e0bba42883432132488b2efcafada 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. <?php
  2. /*
  3. +-------------------------------------------------------------+
  4. | Copyright (c) 2015 Facebook, Inc. (http://www.facebook.com) |
  5. +-------------------------------------------------------------+
  6. */
  7. error_reporting(-1);
  8. $infile = fopen("Testfile.txt", 'r');
  9. var_dump($infile);
  10. echo "\n";
  11. print_r($infile);
  12. echo "\n";
  13. $infile = fopen("NoSuchFile.txt", 'r');
  14. var_dump($infile);
  15. $infile = @fopen("NoSuchFile.txt", 'r');
  16. var_dump($infile);