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