fstat_variation3.phpt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Test function fstat() by substituting argument 1 with emptyUnsetUndefNull values.
  3. --FILE--
  4. <?php
  5. $unset_var = 10;
  6. unset($unset_var);
  7. $variation_array = array(
  8. 'unset var' => @$unset_var,
  9. 'undefined var' => @$undefined_var,
  10. 'empty string DQ' => "",
  11. 'empty string SQ' => '',
  12. 'uppercase NULL' => NULL,
  13. 'lowercase null' => null,
  14. );
  15. foreach ( $variation_array as $var ) {
  16. var_dump(fstat( $var ) );
  17. }
  18. ?>
  19. ===DONE===
  20. --EXPECTF--
  21. Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
  22. bool(false)
  23. Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
  24. bool(false)
  25. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  26. bool(false)
  27. Warning: fstat() expects parameter 1 to be resource, string given in %s on line %d
  28. bool(false)
  29. Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
  30. bool(false)
  31. Warning: fstat() expects parameter 1 to be resource, null given in %s on line %d
  32. bool(false)
  33. ===DONE===