fstat_variation7.phpt 766 B

1234567891011121314151617181920212223242526272829303132333435
  1. --TEST--
  2. Test function fstat() by substituting argument 1 with string values.
  3. --FILE--
  4. <?php
  5. $heredoc = <<<EOT
  6. hello world
  7. EOT;
  8. $variation_array = array(
  9. 'string DQ' => "string",
  10. 'string SQ' => 'string',
  11. 'mixed case string' => "sTrInG",
  12. 'heredoc' => $heredoc,
  13. );
  14. foreach ( $variation_array as $var ) {
  15. var_dump(fstat( $var ) );
  16. }
  17. ?>
  18. ===DONE===
  19. --EXPECTF--
  20. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  21. bool(false)
  22. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  23. bool(false)
  24. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  25. bool(false)
  26. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  27. bool(false)
  28. ===DONE===