Home
last modified time | relevance | path

Searched refs:fp (Results 26 – 50 of 624) sorted by relevance

12345678910>>...25

/PHP-7.4/ext/standard/tests/strings/
H A Dvfprintf_error3.phpt17 $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 Dvfprintf_variation1.phpt19 $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 Dvfprintf_basic8.phpt23 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-7.4/ext/gd/tests/
H A Dcreatefromwbmp2.phpt12 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 Dcreatefromwbmp2_extern.phpt12 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.4/ext/zip/tests/
H A Dbug53579.phpt16 $fp = $zip->getStream('foo');
18 var_dump($fp);
19 if(!$fp) exit("\n");
20 $contents = stream_get_contents($fp);
22 fclose($fp);
27 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
28 if (!$fp) {
31 $contents = stream_get_contents($fp);
33 fclose($fp);
/PHP-7.4/ext/phar/
H A Dtar.c635 myphar->fp = fp; in phar_parse_tarfile()
743 if (fp->error) { in phar_tar_writeheaders_int()
753 if (fp->error) { in phar_tar_writeheaders_int()
767 if (fp->error) { in phar_tar_writeheaders_int()
774 if (fp->error) { in phar_tar_writeheaders_int()
785 if (fp->error) { in phar_tar_writeheaders_int()
798 if (fp->error) { in phar_tar_writeheaders_int()
808 if (fp->error) { in phar_tar_writeheaders_int()
855 if (entry->fp_type == PHAR_MOD && entry->fp != entry->phar->fp && entry->fp != entry->phar->ufp) { in phar_tar_writeheaders_int()
987 entry.fp = NULL; in phar_tar_flush()
[all …]
/PHP-7.4/ext/standard/tests/file/
H A Dbug43522.phpt6 $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 Dfwrite.phpt8 $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 Dbug27619.phpt5 $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);
H A Dbug35781.phpt8 $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 Dstream_get_line.phpt8 $fp = fopen($path, "r");
9 while ($fp && !feof($fp)) {
10 echo stream_get_line($fp, 0, "<br>")."\n";
12 fclose($fp);
/PHP-7.4/ext/standard/tests/streams/
H A Dbug46147.phpt5 $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);
H A Dbug75031.phpt7 $fp = fopen($type, $mode);
8 fwrite($fp, "hello");
9 fseek($fp, 0, SEEK_SET);
10 fwrite($fp, "world");
11 var_dump(stream_get_contents($fp, -1, 0));
12 fclose($fp);
/PHP-7.4/ext/dba/libinifile/
H A Dinifile.c95 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.4/ext/ftp/tests/
H A Dftp_fget_basic.phpt19 $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.4/ext/zlib/tests/
H A Dgzreadgzwriteplain.phpt11 $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 Dgzreadgzwrite.phpt11 $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.4/sapi/cli/tests/
H A Dphp_cli_server_010.phpt13 $fp = php_cli_server_connect();
15 if(fwrite($fp, <<<HEADER
22 while (!feof($fp)) {
23 echo fgets($fp);
27 fclose($fp);
29 $fp = php_cli_server_connect();
31 if(fwrite($fp, <<<HEADER
38 while (!feof($fp)) {
39 echo fgets($fp);
43 fclose($fp);
H A Demptyheader.phpt13 $fp = php_cli_server_connect();
15 fwrite($fp, "GET / HTTP/1.1\r\nUser-Agent\r\nAccept: */*\r\nReferer:\r\nHi\r\n\r\n");
16 fflush($fp);
17 while (!feof($fp)) {
18 echo fgets($fp);
20 fclose($fp);
H A Dphp_cli_server_013.phpt17 if(fwrite($fp, <<<HEADER
26 while (!feof($fp)) {
27 $output .= fgets($fp);
32 fclose($fp);
38 if(fwrite($fp, <<<HEADER
45 while (!feof($fp)) {
46 $output .= fgets($fp);
51 fclose($fp);
56 if(fwrite($fp, <<<HEADER
63 while (!feof($fp)) {
[all …]
/PHP-7.4/tests/basic/
H A Dbug80384.phpt7 $fp = fopen($tmp_filename, 'w');
9 fwrite($fp, str_repeat('ABCDEFGH', 1024));
11 fclose($fp);
14 $fp = fopen($tmp_filename, 'r');
15 $filter = stream_filter_append($fp, "string.rot13");
18 fread($fp, 8 * 1024 * 1024);
20 fclose($fp);
/PHP-7.4/ext/phar/tests/tar/
H A Dphar_stub.phpt33 $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.4/ext/phar/tests/zip/
H A Dphar_stub.phpt33 $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.4/ext/exif/tests/
H A Dexif_read_data_streams_seek.phpt10 $fp = fopen(__DIR__ . '/image027.tiff', 'rb');
12 fseek($fp, 100, SEEK_SET);
14 exif_read_data($fp);
16 var_dump(ftell($fp) === 100);
18 fclose($fp);

Completed in 46 milliseconds

12345678910>>...25