readgzfile_variation4.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. Test function readgzfile() by substituting argument 1 with float values.
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
  6. ?>
  7. --FILE--
  8. <?php
  9. $use_include_path = false;
  10. $variation = array(
  11. 'float 10.5' => 10.5,
  12. 'float -10.5' => -10.5,
  13. 'float 12.3456789000e10' => 12.3456789000e10,
  14. 'float -12.3456789000e10' => -12.3456789000e10,
  15. 'float .5' => .5,
  16. );
  17. foreach ( $variation as $var ) {
  18. var_dump(readgzfile( $var , $use_include_path ) );
  19. }
  20. ?>
  21. ===DONE===
  22. --EXPECTF--
  23. Warning: readgzfile(10.5): failed to open stream: No such file or directory in %s on line %d
  24. bool(false)
  25. Warning: readgzfile(-10.5): failed to open stream: No such file or directory in %s on line %d
  26. bool(false)
  27. Warning: readgzfile(123456789000): failed to open stream: No such file or directory in %s on line %d
  28. bool(false)
  29. Warning: readgzfile(-123456789000): failed to open stream: No such file or directory in %s on line %d
  30. bool(false)
  31. Warning: readgzfile(0.5): failed to open stream: No such file or directory in %s on line %d
  32. bool(false)
  33. ===DONE===