/PHP-7.3/ext/standard/tests/file/ |
H A D | php_fd_wrapper_03.phpt | 2 php://fd wrapper: bad syntax 5 fopen("php://fd", "w"); 6 fopen("php://fd/", "w"); 7 fopen("php://fd/-2", "w"); 8 fopen("php://fd/1/", "w"); 14 Warning: fopen(php://fd): failed to open stream: operation failed in %s on line 2 16 Warning: fopen(php://fd/): failed to open stream: php://fd/ stream must be specified in the form ph… 18 Warning: fopen(php://fd/-2): failed to open stream: The file descriptors must be non-negative numbe… 20 Warning: fopen(php://fd/1/): failed to open stream: php://fd/ stream must be specified in the form …
|
H A D | userstreams_003.phpt | 30 function test($name, $fd, $return_value, $func, $args, $expected_option, $expected_value) { 32 $data = stream_get_meta_data($fd); 42 $fd = fopen("test://foo","r"); 45 test("stream_set_blocking - 1", $fd, true, "stream_set_blocking", array($fd,0), STREAM_OPTION_BLOCK… 46 test("stream_set_blocking - 2", $fd, false, "stream_set_blocking", array($fd,1), STREAM_OPTION_BLOC… 47 test("stream_set_blocking - 3", $fd, "foo", "stream_set_blocking", array($fd,0), STREAM_OPTION_BLOC… 50 test("stream_set_write_buffer - 1", $fd, true, "stream_set_write_buffer", array($fd,0), STREAM_OPTI… 51 test("stream_set_write_buffer - 2", $fd, true, "stream_set_write_buffer", array($fd,4096), STREAM_O… 52 test("stream_set_write_buffer - 3", $fd, false, "stream_set_write_buffer", array($fd,8192), STREAM_… 54 test("stream_set_timeout - 1", $fd, true, "stream_set_timeout", array($fd,10,11), STREAM_OPTION_REA… [all …]
|
H A D | bug44607.phpt | 11 $fd = fopen($tempnam, 'r'); 12 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 13 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 14 fseek($fd, 1, SEEK_SET); 15 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 16 var_dump(strlen(stream_get_line($fd, 15000, $eol))); 17 fclose($fd);
|
/PHP-7.3/ext/standard/tests/streams/ |
H A D | bug64166_3.phpt | 7 $fd = fopen('php://temp', 'w+'); 8 $res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_WRITE, array( 12 fwrite($fd, $data); 13 rewind($fd); 15 var_dump(stream_get_contents($fd, -1, 0)); 19 rewind($fd); 20 stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_WRITE, array( 24 fwrite($fd, $data); 25 rewind($fd); 26 var_dump(stream_get_contents($fd, -1, 0)); [all …]
|
H A D | bug64166.phpt | 7 $fd = fopen('php://temp', 'w+'); 8 fwrite($fd, $data); 9 rewind($fd); 11 $res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( 15 var_dump(stream_get_contents($fd, -1, 0)); 19 rewind($fd); 20 stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( 24 var_dump(stream_get_contents($fd, -1, 0)); 26 fclose($fd);
|
H A D | bug64166_2.phpt | 7 $fd = fopen('php://temp', 'w+'); 8 fwrite($fd, $data); 9 rewind($fd); 11 $res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( 16 while(($c = fread($fd, 1))!= "") $str .= $c; 21 rewind($fd); 22 stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ, array( 27 while(($c = fread($fd, 1))!= "") $str .= $c; 30 fclose($fd);
|
H A D | bug65483.phpt | 8 $fd = fopen('php://temp', 'w+'); 9 fwrite($fd, $data); 10 rewind($fd); 12 $res = stream_filter_append($fd, 'convert.quoted-printable-encode', STREAM_FILTER_READ); 13 var_dump(stream_get_contents($fd, -1, 0)); 15 fclose($fd);
|
H A D | bug63240.phpt | 5 $fd = fopen('php://temp', 'r+'); 8 fwrite($fd, $str); 9 rewind($fd); 10 $line = stream_get_line($fd, 9000, $delimiter); 12 $line = stream_get_line($fd, 9000, $delimiter);
|
H A D | bug74090.phpt | 11 $fd = stream_socket_client("udp://8.8.8.8:53", $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STREAM_C… 12 stream_set_blocking($fd, 0); 13 stream_socket_sendto($fd,$data); 15 $ret = stream_get_contents($fd,65565); 17 stream_socket_shutdown($fd,STREAM_SHUT_RDWR);
|
H A D | bug44818.phpt | 7 $fd = fopen($url, $mode); 8 var_dump($fd, fwrite($fd, "foo")); 9 var_dump(fseek($fd, 0, SEEK_SET), fread($fd, 3)); 10 fclose($fd);
|
H A D | set_file_buffer.phpt | 30 $fd = fopen("test://foo","r"); 31 var_dump(set_file_buffer($fd, 50)); 32 var_dump(stream_set_chunk_size($fd, 42)); 33 var_dump(fwrite($fd, str_repeat('0', 70))); 37 fclose($fd); 38 unset($fd);
|
/PHP-7.3/sapi/fpm/fpm/events/ |
H A D | poll.c | 88 pollfds[i].fd = -1; in fpm_event_poll_init() 159 … && q->ev->index >= 0 && q->ev->index < npollfds && q->ev->fd == active_pollfds[q->ev->index].fd) { in fpm_event_poll_wait() 189 if (pollfds[next_free_slot].fd == -1) { in fpm_event_poll_add() 191 pollfds[next_free_slot].fd = ev->fd; in fpm_event_poll_add() 204 if (pollfds[i].fd != -1) { in fpm_event_poll_add() 210 pollfds[i].fd = ev->fd; in fpm_event_poll_add() 221 zlog(ZLOG_ERROR, "poll: not enought space to add event (fd=%d)", ev->fd); in fpm_event_poll_add() 234 if (ev->index >= 0 && ev->index < npollfds && pollfds[ev->index].fd == ev->fd) { in fpm_event_poll_remove() 239 pollfds[ev->index].fd = -1; in fpm_event_poll_remove() 251 if (pollfds[i].fd != ev->fd) { in fpm_event_poll_remove() [all …]
|
H A D | select.c | 118 if (FD_ISSET(q->ev->fd, ¤t_fds)) { in fpm_event_select_wait() 143 if (ev->fd >= FD_SETSIZE) { in fpm_event_select_add() 149 if (!FD_ISSET(ev->fd, &fds)) { in fpm_event_select_add() 150 FD_SET(ev->fd, &fds); in fpm_event_select_add() 151 ev->index = ev->fd; in fpm_event_select_add() 164 if (FD_ISSET(ev->fd, &fds)) { in fpm_event_select_remove() 165 FD_CLR(ev->fd, &fds); in fpm_event_select_remove()
|
H A D | epoll.c | 170 e.data.fd = ev->fd; in fpm_event_epoll_add() 178 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ev->fd, &e) == -1) { in fpm_event_epoll_add() 179 zlog(ZLOG_ERROR, "epoll: unable to add fd %d", ev->fd); in fpm_event_epoll_add() 184 ev->index = ev->fd; in fpm_event_epoll_add() 198 e.data.fd = ev->fd; in fpm_event_epoll_remove() 206 if (epoll_ctl(epollfd, EPOLL_CTL_DEL, ev->fd, &e) == -1) { in fpm_event_epoll_remove() 207 zlog(ZLOG_ERROR, "epoll: unable to remove fd %d", ev->fd); in fpm_event_epoll_remove()
|
/PHP-7.3/ext/gd/libgd/ |
H A D | gd_gif_in.c | 117 gdIOCtx *fd = gdNewFileCtx(fdFile); in gdImageCreateFromGif() local 120 im = gdImageCreateFromGifCtx(fd); in gdImageCreateFromGif() 122 fd->gd_free(fd); in gdImageCreateFromGif() 155 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx() 170 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx() 194 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx() 202 if (! ReadOK(fd,&c,1)) { in gdImageCreateFromGifCtx() 215 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx() 250 ReadImage(im, fd, width, height, in gdImageCreateFromGifCtx() 337 if (! ReadOK(fd,&count,1)) { in GetDataBlock_() [all …]
|
/PHP-7.3/sapi/phpdbg/ |
H A D | phpdbg_out.h | 44 PHPDBG_API int phpdbg_print(int severity, int fd, const char *tag, const char *xmlfmt, const char *… 45 PHPDBG_API int phpdbg_xml_internal(int fd, const char *fmt, ...) PHPDBG_ATTRIBUTE_FORMAT(printf, 2,… 46 PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHPDBG_ATTRIBUTE_FORMAT(printf, 2,… 47 PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHPDBG_ATTRIBUTE_FORMAT(printf, 2,… 48 PHPDBG_API int phpdbg_rlog_internal(int fd, const char *fmt, ...) PHPDBG_ATTRIBUTE_FORMAT(printf, 2… 50 …fmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PHPDBG_STDOUT].fd, tag, xmlfmt, strfm… 55 #define phpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 56 #define phpdbg_xml(fmt, ...) phpdbg_xml_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 57 #define phpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__) 68 #define phpdbg_rlog(fd, fmt, ...) phpdbg_rlog_internal(fd, fmt, ##__VA_ARGS__) argument [all …]
|
/PHP-7.3/ext/standard/ |
H A D | random.c | 49 random_globals_p->fd = -1; in random_globals_ctor() 54 if (random_globals_p->fd > 0) { in random_globals_dtor() 55 close(random_globals_p->fd); in random_globals_dtor() 56 random_globals_p->fd = -1; in random_globals_dtor() 140 int fd = RANDOM_G(fd); in php_random_bytes() 143 if (fd < 0) { in php_random_bytes() 145 fd = open("/dev/urandom", O_RDONLY); in php_random_bytes() 147 if (fd < 0) { in php_random_bytes() 154 if (fstat(fd, &st) != 0 || in php_random_bytes() 161 close(fd); in php_random_bytes() [all …]
|
/PHP-7.3/main/ |
H A D | php_network.h | 132 php_socket_t fd; member 172 static inline int php_pollfd_for(php_socket_t fd, int events, struct timeval *timeouttv) in php_pollfd_for() argument 177 p.fd = fd; in php_pollfd_for() 190 static inline int php_pollfd_for_ms(php_socket_t fd, int events, int timeout) in php_pollfd_for_ms() argument 195 p.fd = fd; in php_pollfd_for_ms() 214 # define PHP_SAFE_FD_SET(fd, set) FD_SET(fd, set) argument 215 # define PHP_SAFE_FD_CLR(fd, set) FD_CLR(fd, set) argument 216 # define PHP_SAFE_FD_ISSET(fd, set) FD_ISSET(fd, set) argument 219 # define PHP_SAFE_FD_SET(fd, set) do { if (fd < FD_SETSIZE) FD_SET(fd, set); } while(0) argument 220 # define PHP_SAFE_FD_CLR(fd, set) do { if (fd < FD_SETSIZE) FD_CLR(fd, set); } while(0) argument [all …]
|
H A D | php_open_temporary_file.c | 101 int fd = -1; in php_do_open_temporary_file() local 181 fd = mkstemp(opened_path); in php_do_open_temporary_file() 189 if (fd != -1 && opened_path_p) { in php_do_open_temporary_file() 194 if (fd != -1 && opened_path_p) { in php_do_open_temporary_file() 199 return fd; in php_do_open_temporary_file() 290 int fd; in php_open_temporary_fd_ex() local 313 if (fd == -1) { in php_open_temporary_fd_ex() 320 return fd; in php_open_temporary_fd_ex() 333 if (fd == -1) { in php_open_temporary_file() 337 fp = fdopen(fd, "r+b"); in php_open_temporary_file() [all …]
|
/PHP-7.3/ext/pcre/pcre2lib/sljit/ |
H A D | sljitProtExecAllocator.c | 73 int fd; member 104 int fd; in create_tempfile() local 146 return fd; in create_tempfile() 158 return fd; in create_tempfile() 161 close(fd); in create_tempfile() 165 return fd; in create_tempfile() 171 int fd; in alloc_chunk() local 178 close(fd); in alloc_chunk() 197 retval->fd = fd; in alloc_chunk() 205 int fd = header->fd; in free_chunk() local [all …]
|
/PHP-7.3/sapi/fpm/fpm/ |
H A D | fpm_stdio.c | 27 int fd = open("/dev/null", O_RDWR); in fpm_stdio_init_main() local 29 if (0 > fd) { in fpm_stdio_init_main() 34 if (0 > dup2(fd, STDIN_FILENO) || 0 > dup2(fd, STDOUT_FILENO)) { in fpm_stdio_init_main() 36 close(fd); in fpm_stdio_init_main() 39 close(fd); in fpm_stdio_init_main() 118 int fd = ev->fd; local 316 int fd; local 330 if (0 > fd) { 337 dup2(fd, STDERR_FILENO); 341 close(fd); [all …]
|
/PHP-7.3/ext/bz2/tests/ |
H A D | 004.phpt | 9 var_dump(bzerror($fd)); 10 var_dump(bzerrstr($fd)); 11 var_dump(bzerrno($fd)); 18 var_dump(bzread($fd, 10)); 19 var_dump(bzerror($fd)); 20 var_dump(bzerrstr($fd)); 21 var_dump(bzerrno($fd)); 28 var_dump(bzread($fd)); 29 var_dump(bzerror($fd)); 30 var_dump(bzerrstr($fd)); [all …]
|
/PHP-7.3/ext/fileinfo/libmagic/ |
H A D | buffer.c | 44 buffer_init(struct buffer *b, int fd, const void *data, size_t len) in buffer_init() argument 46 b->fd = fd; in buffer_init() 47 if (b->fd == -1 || zend_fstat(b->fd, &b->st) == -1) in buffer_init() 79 if (FINFO_LSEEK_FUNC(b->fd, b->eoff, SEEK_SET) == (zend_off_t)-1 || in buffer_fill() 80 FINFO_READ_FUNC(b->fd, b->ebuf, b->elen) != (ssize_t)b->elen) in buffer_fill()
|
/PHP-7.3/ext/standard/tests/filters/ |
H A D | bug46164-2.phpt | 17 $fd = fopen('php://memory','w'); 18 $filter = stream_filter_append($fd, 'user_filter'); 19 fwrite($fd, "foo"); 20 fflush($fd); 21 var_dump(fclose($fd));
|
/PHP-7.3/ext/session/ |
H A D | mod_files.c | 100 int fd; member 145 if (data->fd != -1) { in ps_files_close() 151 close(data->fd); in ps_files_close() 152 data->fd = -1; in ps_files_close() 196 if (data->fd != -1) { in ps_files_open() 207 close(data->fd); in ps_files_open() 208 data->fd = -1; in ps_files_open() 239 if (data->fd < 0) { in ps_files_write() 422 data->fd = -1; in PS_OPEN_FUNC() 483 if (data->fd < 0) { in PS_READ_FUNC() [all …]
|