gzfile_variation9.phpt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --TEST--
  2. Test function gzfile() by substituting argument 2 with boolean values.
  3. --EXTENSIONS--
  4. zlib
  5. --FILE--
  6. <?php
  7. $filename = __DIR__."/004.txt.gz";
  8. $variation = array(
  9. 'lowercase true' => true,
  10. 'lowercase false' =>false,
  11. 'uppercase TRUE' =>TRUE,
  12. 'uppercase FALSE' =>FALSE,
  13. );
  14. foreach ( $variation as $var ) {
  15. var_dump(gzfile( $filename, $var ) );
  16. }
  17. ?>
  18. --EXPECT--
  19. array(6) {
  20. [0]=>
  21. string(36) "When you're taught through feelings
  22. "
  23. [1]=>
  24. string(26) "Destiny flying high above
  25. "
  26. [2]=>
  27. string(38) "all I know is that you can realize it
  28. "
  29. [3]=>
  30. string(18) "Destiny who cares
  31. "
  32. [4]=>
  33. string(19) "as it turns around
  34. "
  35. [5]=>
  36. string(39) "and I know that it descends down on me
  37. "
  38. }
  39. array(6) {
  40. [0]=>
  41. string(36) "When you're taught through feelings
  42. "
  43. [1]=>
  44. string(26) "Destiny flying high above
  45. "
  46. [2]=>
  47. string(38) "all I know is that you can realize it
  48. "
  49. [3]=>
  50. string(18) "Destiny who cares
  51. "
  52. [4]=>
  53. string(19) "as it turns around
  54. "
  55. [5]=>
  56. string(39) "and I know that it descends down on me
  57. "
  58. }
  59. array(6) {
  60. [0]=>
  61. string(36) "When you're taught through feelings
  62. "
  63. [1]=>
  64. string(26) "Destiny flying high above
  65. "
  66. [2]=>
  67. string(38) "all I know is that you can realize it
  68. "
  69. [3]=>
  70. string(18) "Destiny who cares
  71. "
  72. [4]=>
  73. string(19) "as it turns around
  74. "
  75. [5]=>
  76. string(39) "and I know that it descends down on me
  77. "
  78. }
  79. array(6) {
  80. [0]=>
  81. string(36) "When you're taught through feelings
  82. "
  83. [1]=>
  84. string(26) "Destiny flying high above
  85. "
  86. [2]=>
  87. string(38) "all I know is that you can realize it
  88. "
  89. [3]=>
  90. string(18) "Destiny who cares
  91. "
  92. [4]=>
  93. string(19) "as it turns around
  94. "
  95. [5]=>
  96. string(39) "and I know that it descends down on me
  97. "
  98. }