readgzfile_variation11.phpt 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --TEST--
  2. Test function readgzfile() by substituting argument 2 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. $filename = dirname(__FILE__)."/004.txt.gz";
  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( $filename, $var ) );
  19. }
  20. ?>
  21. ===DONE===
  22. --EXPECT--
  23. When you're taught through feelings
  24. Destiny flying high above
  25. all I know is that you can realize it
  26. Destiny who cares
  27. as it turns around
  28. and I know that it descends down on me
  29. int(176)
  30. When you're taught through feelings
  31. Destiny flying high above
  32. all I know is that you can realize it
  33. Destiny who cares
  34. as it turns around
  35. and I know that it descends down on me
  36. int(176)
  37. When you're taught through feelings
  38. Destiny flying high above
  39. all I know is that you can realize it
  40. Destiny who cares
  41. as it turns around
  42. and I know that it descends down on me
  43. int(176)
  44. When you're taught through feelings
  45. Destiny flying high above
  46. all I know is that you can realize it
  47. Destiny who cares
  48. as it turns around
  49. and I know that it descends down on me
  50. int(176)
  51. When you're taught through feelings
  52. Destiny flying high above
  53. all I know is that you can realize it
  54. Destiny who cares
  55. as it turns around
  56. and I know that it descends down on me
  57. int(176)
  58. ===DONE===