/PHP-7.2/ext/standard/tests/file/ |
H A D | fgetcsv_variation23.phpt | 17 $fp = fopen ($filename, "w"); 18 fclose($fp); 19 $fp = fopen ($filename, "r"); 20 if (!$fp) { 24 var_dump( fgetcsv($fp) ); 25 var_dump( ftell($fp) ); 26 var_dump( fgetcsv($fp, 1024) ); 27 var_dump( ftell($fp) ); 29 var_dump( ftell($fp) ); 31 var_dump( ftell($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 | 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 | 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-7.2/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_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);
|
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);
|
/PHP-7.2/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-7.2/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-7.2/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 …]
|
H A D | emptyheader.phpt | 12 $fp = fsockopen(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT, $errno, $errmsg, 0.5); 14 if (!$fp) { 18 fwrite($fp, "GET / HTTP/1.1\r\nUser-Agent\r\nAccept: */*\r\nReferer:\r\nHi\r\n\r\n"); 19 fflush($fp); 20 while (!feof($fp)) { 21 echo fgets($fp); 23 fclose($fp);
|
/PHP-7.2/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() 257 php_stream_rewind(dba->fp); in inifile_fetch() 333 php_stream_flush(dba->fp); in inifile_find_group() 334 php_stream_seek(dba->fp, 0, SEEK_SET); in inifile_find_group() 389 php_stream *fp; in inifile_copy_to() local 406 if (SUCCESS != php_stream_copy_to_stream_ex(dba->fp, fp, pos_end - pos_start, NULL)) { in inifile_copy_to() 434 if (SUCCESS != php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter() 453 if (SUCCESS != php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) { in inifile_filter() 553 php_stream_close(ini_tmp->fp); in inifile_delete_replace_append() [all …]
|
/PHP-7.2/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-7.2/ext/standard/tests/streams/ |
H A D | bug46147.phpt | 5 $fp = tmpfile(); 6 fwrite($fp, "this is a lowercase string.\n"); 7 fseek($fp, 5); 8 stream_filter_append($fp, "string.toupper"); 9 while (!feof($fp)) { 10 echo fread($fp, 5);
|
/PHP-7.2/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-7.2/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, 'booya'); 46 fclose($fp); 49 $fp = fopen($fname3, 'rb'); [all …]
|
/PHP-7.2/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, 'booya'); 46 fclose($fp); 49 $fp = fopen($fname3, 'rb'); [all …]
|