/PHP-5.5/ext/standard/tests/strings/ |
H A D | vfprintf_error3.phpt | 17 $fp = fopen( $file, "a+" ); 22 rewind( $fp ); 23 var_dump( stream_get_contents( $fp ) ); 24 ftruncate( $fp, 0 ); 25 rewind( $fp ); 27 var_dump( vfprintf( $fp, "Foo %y fake", "not available" ) ); 29 rewind( $fp ); 30 var_dump( stream_get_contents( $fp ) ); 31 ftruncate( $fp, 0 ); 32 rewind( $fp ); [all …]
|
H A D | vfprintf_variation1.phpt | 19 $fp = fopen( $file, 'a+' ); 33 function writeAndDump($fp, $format, $args) 35 ftruncate( $fp, 0 ); 36 $length = vfprintf( $fp, $format, $args ); 37 rewind( $fp ); 38 $content = stream_get_contents( $fp ); 44 writeAndDump( $fp, "format", null ); 46 writeAndDump( $fp, "Foobar testing", array() ); 48 writeAndDump( $fp, "%02d", array( 50 ) ); 49 writeAndDump( $fp, "", array() ); [all …]
|
H A D | vfprintf_basic8.phpt | 23 if (!($fp = fopen($data_file, 'wt'))) 26 vfprintf($fp, $format1,$arg1); 27 fprintf($fp, "\n"); 29 vfprintf($fp, $format2,$arg2); 30 fprintf($fp, "\n"); 32 vfprintf($fp, $format3,$arg3); 33 fprintf($fp, "\n"); 35 fclose($fp);
|
H A D | vfprintf_basic5.phpt | 23 if (!($fp = fopen($data_file, 'wt'))) 26 vfprintf($fp, $format1,$arg1); 27 fprintf($fp, "\n"); 29 vfprintf($fp, $format2,$arg2); 30 fprintf($fp, "\n"); 32 vfprintf($fp, $format3,$arg3); 33 fprintf($fp, "\n"); 35 fclose($fp);
|
H A D | vfprintf_basic6.phpt | 24 if (!($fp = fopen($data_file, 'wt'))) 27 vfprintf($fp, $format1,$arg1); 28 fprintf($fp, "\n"); 30 vfprintf($fp, $format2,$arg2); 31 fprintf($fp, "\n"); 33 vfprintf($fp, $format3,$arg3); 34 fprintf($fp, "\n"); 36 fclose($fp);
|
H A D | vfprintf_basic2.phpt | 27 if (!($fp = fopen($data_file, 'wt'))) 30 vfprintf($fp, $format1, $arg1); 31 fprintf($fp, "\n"); 33 vfprintf($fp, $format2, $arg2); 34 fprintf($fp, "\n"); 36 vfprintf($fp, $format3, $arg3); 37 fprintf($fp, "\n"); 39 fclose($fp);
|
H A D | vfprintf_basic4.phpt | 23 if (!($fp = fopen($data_file, 'wt'))) 26 vfprintf($fp, $format1,$arg1); 27 fprintf($fp, "\n"); 29 vfprintf($fp, $format2,$arg2); 30 fprintf($fp, "\n"); 32 vfprintf($fp, $format3,$arg3); 33 fprintf($fp, "\n"); 35 fclose($fp);
|
/PHP-5.5/ext/gd/tests/ |
H A D | createfromwbmp2_extern.phpt | 12 if (!$fp) { 18 fputs($fp, chr($c), 1); 19 fputs($fp, $c, 1); 23 fputs($fp, chr($c), 1); 25 fputs($fp, chr($c), 1); 26 fputs($fp, chr($c), 1); 27 fputs($fp, chr($c), 1); 29 fputs($fp, chr($c), 1); 33 fputs($fp, chr($c), 1); 37 fwrite($fp, chr($c), 1); [all …]
|
H A D | createfromwbmp2.phpt | 12 if (!$fp) { 18 fputs($fp, chr($c), 1); 19 fputs($fp, $c, 1); 23 fputs($fp, chr($c), 1); 25 fputs($fp, chr($c), 1); 26 fputs($fp, chr($c), 1); 27 fputs($fp, chr($c), 1); 29 fputs($fp, chr($c), 1); 33 fputs($fp, chr($c), 1); 37 fwrite($fp, chr($c), 1); [all …]
|
/PHP-5.5/ext/dba/libinifile/ |
H A D | inifile.c | 95 dba->fp = fp; in inifile_alloc() 184 ln->pos = php_stream_tell(dba->fp); in inifile_read() 256 php_stream_rewind(dba->fp); in inifile_fetch() 332 php_stream_flush(dba->fp); in inifile_find_group() 333 php_stream_seek(dba->fp, 0, SEEK_SET); in inifile_find_group() 388 php_stream *fp; in inifile_copy_to() local 405 if (!php_stream_copy_to_stream_ex(dba->fp, fp, pos_end - pos_start, NULL)) { in inifile_copy_to() 430 if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter() 449 if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter() 549 php_stream_close(ini_tmp->fp); in inifile_delete_replace_append() [all …]
|
/PHP-5.5/ext/zip/tests/ |
H A D | bug53579.phpt | 17 $fp = $zip->getStream('foo'); 19 var_dump($fp); 20 if(!$fp) exit("\n"); 21 $contents = stream_get_contents($fp); 23 fclose($fp); 28 $fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); 29 if (!$fp) { 32 $contents = stream_get_contents($fp); 34 fclose($fp);
|
/PHP-5.5/sapi/cli/tests/ |
H A D | php_cli_server_010.phpt | 15 $fp = fsockopen($host, $port, $errno, $errstr, 0.5); 16 if (!$fp) { 20 if(fwrite($fp, <<<HEADER 27 while (!feof($fp)) { 28 echo fgets($fp); 32 fclose($fp); 35 if (!$fp) { 40 if(fwrite($fp, <<<HEADER 47 while (!feof($fp)) { 48 echo fgets($fp); [all …]
|
H A D | php_cli_server_013.phpt | 17 if (!$fp) { 22 if(fwrite($fp, <<<HEADER 31 while (!feof($fp)) { 32 $output .= fgets($fp); 37 fclose($fp); 42 if (!$fp) { 53 while (!feof($fp)) { 59 fclose($fp); 63 if (!$fp) { 74 while (!feof($fp)) { [all …]
|
/PHP-5.5/ext/ftp/tests/ |
H A D | ftp_fget_basic.phpt | 19 $fp = tmpfile(); 20 var_dump(ftp_fget($ftp, $fp ,'a story.txt', FTP_ASCII)); 21 fseek($fp, 0); 22 echo fgets($fp); 24 $postition = ftell($fp); 26 var_dump(ftp_fget($ftp, $fp, 'binary data.bin', FTP_BINARY)); 27 fseek($fp, $postition); 28 var_dump(urlencode(fgets($fp))); 31 ftp_fget($ftp, $fp ,'a warning.txt', FTP_ASCII); 34 fclose($fp);
|
/PHP-5.5/ext/standard/tests/file/ |
H A D | fwrite.phpt | 8 $fp = fopen($filename, "w"); 9 var_dump(fwrite($fp)); 10 var_dump(fwrite($fp, array())); 11 fclose($fp); 13 $fp = fopen($filename, "r"); 14 var_dump(fwrite($fp, "data")); 16 $fp = fopen($filename, "w"); 17 var_dump(fwrite($fp, "data", -1)); 18 var_dump(fwrite($fp, "data", 100000)); 19 fclose($fp); [all …]
|
H A D | bug43522.phpt | 6 $fp = fopen(__FILE__, 'r'); // Open self 8 DoTest($fp, 'ZZZ'); // test multi-char delimiter 9 DoTest($fp, "Z"); // test single-char delimiter 11 function DoTest($fp, $delim) { 13 rewind($fp); 14 echo "\t" . stream_get_line($fp, 10, $delim) . "\n"; 15 echo "\t" . stream_get_line($fp, 10, $delim) . "\n";
|
H A D | bug35781.phpt | 8 $fp = fopen($filename, "w"); 9 stream_filter_append($fp, "string.rot13", -49); 10 fwrite($fp, "This is a test\n"); 11 rewind($fp); 12 fpassthru($fp); 13 fclose($fp);
|
H A D | bug27619.phpt | 5 $fp = tmpfile(); 6 fwrite($fp, "this is a lowercase string.\n"); 7 rewind($fp); 11 echo fread($fp, 4); 13 stream_filter_append($fp, "string.toupper"); 15 fpassthru($fp);
|
/PHP-5.5/ext/zlib/tests/ |
H A D | gzreadgzwriteplain.phpt | 11 $fp = fopen($filename, "wb"); 12 fwrite($fp, $original); 14 var_dump(ftell($fp)); 15 fclose($fp); 17 $fp = gzopen($filename, "rb"); 20 while ($buf = gzread($fp, 8192)) { 31 gzseek($fp, strlen($original) / 2); 34 while ($buf = gzread($fp, 8192)) { 46 gzclose($fp);
|
H A D | gzreadgzwrite.phpt | 11 $fp = gzopen($filename, "wb"); 12 gzwrite($fp, $original); 14 var_dump(gztell($fp)); 15 fclose($fp); 17 $fp = gzopen($filename, "rb"); 20 while ($buf = gzread($fp, 8092)) { 30 gzclose($fp);
|
/PHP-5.5/ext/mcrypt/tests/ |
H A D | mcrypt_filters.phpt | 21 $fp = fopen($secretfile, 'wb'); 22 stream_filter_append($fp, 'mcrypt.tripledes', STREAM_FILTER_WRITE, $opts); 23 fwrite($fp, 'Secret secret secret data'); 24 fclose($fp); 28 $fp = fopen($secretfile, 'rb'); 29 stream_filter_append($fp, 'mdecrypt.tripledes', STREAM_FILTER_READ, $opts); 30 $data = stream_get_contents($fp); 31 fclose($fp);
|
/PHP-5.5/ext/phar/tests/tar/ |
H A D | phar_stub.phpt | 33 $fp = fopen($fname3, 'wb'); 34 fwrite($fp, $file); 35 fclose($fp); 36 $fp = fopen($fname3, 'rb'); 39 $phar->setStub($fp); 40 fclose($fp); 44 $fp = fopen($fname3, 'ab'); 45 fwrite($fp, b'booya'); 46 fclose($fp); 49 $fp = fopen($fname3, 'rb'); [all …]
|
/PHP-5.5/ext/phar/tests/zip/ |
H A D | phar_stub.phpt | 33 $fp = fopen($fname3, 'wb'); 34 fwrite($fp, $file); 35 fclose($fp); 36 $fp = fopen($fname3, 'rb'); 39 $phar->setStub($fp); 40 fclose($fp); 44 $fp = fopen($fname3, 'ab'); 45 fwrite($fp, b'booya'); 46 fclose($fp); 49 $fp = fopen($fname3, 'rb'); [all …]
|
/PHP-5.5/ext/standard/tests/streams/ |
H A D | stream_get_meta_data_file_variation2.phpt | 8 $fp = fopen($filename, "w+"); 13 fwrite($fp, "a line of data\n"); 16 var_dump(stream_get_meta_data($fp)); 19 rewind($fp); 22 var_dump(fgets($fp)); 24 var_dump(stream_get_meta_data($fp)); 27 fread($fp, 20); 29 var_dump(stream_get_meta_data($fp)); 32 while(!feof($fp)) { 33 fread($fp, 1); [all …]
|
H A D | stream_get_meta_data_file_variation5.phpt | 8 $fp = fopen($filename, "w+"); 13 fwrite($fp, "a line of data\n"); 16 var_dump(stream_get_meta_data($fp)); 19 rewind($fp); 22 while(!feof($fp)) { 23 fread($fp, 1); 26 var_dump(stream_get_meta_data($fp)); 28 fclose($fp);
|