From: Máté Kocsis Date: Mon, 16 Dec 2019 18:30:14 +0000 (+0100) Subject: Add stubs for standard library X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7b2082352b11efedb058b9ddc6be15f30dfae8f;p=php Add stubs for standard library Closes GH-5017 --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 1a18bd2af1..da97eabf75 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -122,211 +122,6 @@ static void user_tick_function_dtor(user_tick_function_entry *tick_function_entr /* {{{ arginfo */ -/* {{{ streamsfuncs.c */ -#if HAVE_SOCKETPAIR -ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_pair, 0) - ZEND_ARG_INFO(0, domain) - ZEND_ARG_INFO(0, type) - ZEND_ARG_INFO(0, protocol) -ZEND_END_ARG_INFO() -#endif - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) - ZEND_ARG_INFO(0, remoteaddress) - ZEND_ARG_INFO(1, errcode) - ZEND_ARG_INFO(1, errstring) - ZEND_ARG_INFO(0, timeout) - ZEND_ARG_INFO(0, flags) - ZEND_ARG_INFO(0, context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1) - ZEND_ARG_INFO(0, localaddress) - ZEND_ARG_INFO(1, errcode) - ZEND_ARG_INFO(1, errstring) - ZEND_ARG_INFO(0, flags) - ZEND_ARG_INFO(0, context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1) - ZEND_ARG_INFO(0, serverstream) - ZEND_ARG_INFO(0, timeout) - ZEND_ARG_INFO(1, peername) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_get_name, 0) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, want_peer) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_sendto, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, data) - ZEND_ARG_INFO(0, flags) - ZEND_ARG_INFO(0, target_addr) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_recvfrom, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, amount) - ZEND_ARG_INFO(0, flags) - ZEND_ARG_INFO(1, remote_addr) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_contents, 0, 0, 1) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, maxlen) - ZEND_ARG_INFO(0, offset) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_copy_to_stream, 0, 0, 2) - ZEND_ARG_INFO(0, source) - ZEND_ARG_INFO(0, dest) - ZEND_ARG_INFO(0, maxlen) - ZEND_ARG_INFO(0, pos) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_get_meta_data, 0) - ZEND_ARG_INFO(0, fp) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_get_transports, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_get_wrappers, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_resolve_include_path, 0) - ZEND_ARG_INFO(0, filename) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_is_local, 0) - ZEND_ARG_INFO(0, stream) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_supports_lock, 0, 0, 1) - ZEND_ARG_INFO(0, stream) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_isatty, 0, 0, 1) - ZEND_ARG_INFO(0, stream) -ZEND_END_ARG_INFO() - -#ifdef PHP_WIN32 -ZEND_BEGIN_ARG_INFO_EX(arginfo_sapi_windows_vt100_support, 0, 0, 1) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, enable) -ZEND_END_ARG_INFO() -#endif - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_select, 0, 0, 4) - ZEND_ARG_INFO(1, read_streams) /* ARRAY_INFO(1, read_streams, 1) */ - ZEND_ARG_INFO(1, write_streams) /* ARRAY_INFO(1, write_streams, 1) */ - ZEND_ARG_INFO(1, except_streams) /* ARRAY_INFO(1, except_streams, 1) */ - ZEND_ARG_INFO(0, tv_sec) - ZEND_ARG_INFO(0, tv_usec) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_context_get_options, 0) - ZEND_ARG_INFO(0, stream_or_context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_set_option, 0, 0, 2) - ZEND_ARG_INFO(0, stream_or_context) - ZEND_ARG_INFO(0, wrappername) - ZEND_ARG_INFO(0, optionname) - ZEND_ARG_INFO(0, value) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_params, 0) - ZEND_ARG_INFO(0, stream_or_context) - ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_params, 0, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, stream_or_context) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0) - ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_context_set_default, 0) - ZEND_ARG_INFO(0, options) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) - ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */ - ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */ -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, filtername) - ZEND_ARG_INFO(0, read_write) - ZEND_ARG_INFO(0, filterparams) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_append, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, filtername) - ZEND_ARG_INFO(0, read_write) - ZEND_ARG_INFO(0, filterparams) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_filter_remove, 0) - ZEND_ARG_INFO(0, stream_filter) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_get_line, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, maxlen) - ZEND_ARG_INFO(0, ending) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_set_blocking, 0) - ZEND_ARG_INFO(0, socket) - ZEND_ARG_INFO(0, mode) -ZEND_END_ARG_INFO() - -#if HAVE_SYS_TIME_H || defined(PHP_WIN32) -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_set_timeout, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, seconds) - ZEND_ARG_INFO(0, microseconds) -ZEND_END_ARG_INFO() -#endif - -ZEND_BEGIN_ARG_INFO(arginfo_stream_set_read_buffer, 0) - ZEND_ARG_INFO(0, fp) - ZEND_ARG_INFO(0, buffer) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0) - ZEND_ARG_INFO(0, fp) - ZEND_ARG_INFO(0, buffer) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_stream_set_chunk_size, 0) - ZEND_ARG_INFO(0, fp) - ZEND_ARG_INFO(0, chunk_size) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_enable_crypto, 0, 0, 2) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, enable) - ZEND_ARG_INFO(0, cryptokind) - ZEND_ARG_INFO(0, sessionstream) -ZEND_END_ARG_INFO() - -#ifdef HAVE_SHUTDOWN -ZEND_BEGIN_ARG_INFO(arginfo_stream_socket_shutdown, 0) - ZEND_ARG_INFO(0, stream) - ZEND_ARG_INFO(0, how) -ZEND_END_ARG_INFO() -#endif -/* }}} */ - static const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(constant, arginfo_constant) PHP_FE(bin2hex, arginfo_bin2hex) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index f2313ff831..d20f9c0bb7 100755 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -1171,6 +1171,147 @@ function random_int(int $min, int $max): int {} function soundex(string $string): string|false {} +/* streamsfuncs.c */ + +function stream_select(?array &$read, ?array &$write, ?array &$except, ?int $tv_sec, int $tv_usec = 0): int|false {} + +/** @return resource */ +function stream_context_create(?array $options = null, ?array $params = null) {} + +/** @param resource $context */ +function stream_context_set_params($context, array $params): bool {} + +/** @param resource $context */ +function stream_context_get_params($context): array {} + +/** + * @param resource $context + * @param array|string $param2 + * @param mixed $value + */ +function stream_context_set_option($context, $param2, string $option_name = UNKNOWN, $value = UNKNOWN): bool {} + +/** @param resource $stream_or_context */ +function stream_context_get_options($stream_or_context): array {} + +/** @return resource */ +function stream_context_get_default(array $options = UNKNOWN) {} + +/** @return resource */ +function stream_context_set_default(array $options) {} + +/** + * @param resource $stream + * @param mixed $params + * @return resource|false + */ +function stream_filter_prepend($stream, string $filtername, int $read_write = 0, $params = UNKNOWN) {} + +/** + * @param resource $stream + * @param mixed $params + * @return resource|false + */ +function stream_filter_append($stream, string $filtername, int $read_write = 0, $params = UNKNOWN) {} + +/** @param resource $stream_filter */ +function stream_filter_remove($stream_filter): bool {} + +/** + * @param resource $context + * @return resource|false + */ +function stream_socket_client(string $remote_socket, &$errno = null, &$errstr = null, float $timeout = STREAM_CLIENT_CONNECT, int $flags = UNKNOWN, $context = null) {} + +/** + * @param resource $context + * @return resource|false + */ +function stream_socket_server(string $local_socket, &$errno = null, &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) {} + +/** + * @param resource $server_socket + * @param float $timeout + * @return resource|false + */ +function stream_socket_accept($server_socket, float $timeout = UNKNOWN, &$peername = null) {} + +/** @param resource $handle */ +function stream_socket_get_name($handle, bool $want_peer): string|false {} + +/** @param resource $socket */ +function stream_socket_recvfrom($socket, int $length, int $flags = 0, &$address = null): string|false {} + +/** @param resource $socket */ +function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ""): int|false {} + +/** + * @param resource $stream + * @param resource $session_stream + */ +function stream_socket_enable_crypto($stream, bool $enable, ?int $crypto_type = null, $session_stream = null): int|bool {} + +#ifdef HAVE_SHUTDOWN +/** @param resource $stream */ +function stream_socket_shutdown($stream, int $how): bool {} +#endif + +#if HAVE_SOCKETPAIR +function stream_socket_pair(int $domain, int $type, int $protocol): array|false {} +#endif + +/** + * @param resource $source + * @param resource $dest + */ +function stream_copy_to_stream($source, $dest, int $maxlength = UNKNOWN, int $position = 0): int|false {} + +/** @param resource $handle */ +function stream_get_contents($handle, int $maxlength = UNKNOWN, int $position = -1): string|false {} + +/** @param resource $stream */ +function stream_supports_lock($stream): bool {} + +/** @param resource $stream */ +function stream_set_write_buffer($stream, int $buffer): int {} + +/** @param resource $stream */ +function stream_set_read_buffer($stream, int $buffer): int {} + +/** @param resource $stream */ +function stream_set_blocking($stream, bool $mode): bool {} + +/** @param resource $stream */ +function stream_get_meta_data($stream): array {} + +/** @param resource $handle */ +function stream_get_line($handle, int $max_length, string $ending = ""): string|false {} + +function stream_resolve_include_path(string $filename): string|false {} + +function stream_get_wrappers(): array|false {} + +function stream_get_transports(): array|false {} + +/** @param mixed $stream */ +function stream_is_local($stream): bool {} + +/** @param resource $stream */ +function stream_isatty($stream): bool {} + +#ifdef PHP_WIN32 +/** @param resource $stream */ +function sapi_windows_vt100_support($stream, bool $enable): bool {} +#endif + +/** @param resource $stream */ +function stream_set_chunk_size($stream, int $size): int {} + +#if HAVE_SYS_TIME_H || defined(PHP_WIN32) +/** @param resource $socket */ +function stream_set_timeout($socket, int $seconds, int $microseconds = 0): bool {} +#endif + /* type.c */ /** @param mixed $var */ @@ -1253,6 +1394,16 @@ function get_headers(string $url, int $format = 0, $context = null): array|false /* user_filters.c */ +class php_user_filter { + public function filter($in, $out, &$consumed, $closing) {} + + /** @return void */ + public function onCreate() {} + + /** @return void */ + public function onClose() {} +} + /** @param resource $brigade */ function stream_bucket_make_writeable($brigade): ?object {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 816e7c2427..c0d7f2a45f 100755 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1819,6 +1819,193 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_soundex, 0, 1, MAY_BE_STRING|MAY ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(1, write, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(1, except, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(0, tv_sec, IS_LONG, 1) + ZEND_ARG_TYPE_INFO(0, tv_usec, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 1) + ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 1) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_set_params, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, context) + ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_get_params, 0, 1, IS_ARRAY, 0) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_set_option, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, context) + ZEND_ARG_INFO(0, param2) + ZEND_ARG_TYPE_INFO(0, option_name, IS_STRING, 0) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_context_get_options, 0, 1, IS_ARRAY, 0) + ZEND_ARG_INFO(0, stream_or_context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_get_default, 0, 0, 0) + ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_set_default, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_filter_prepend, 0, 0, 2) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, filtername, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, read_write, IS_LONG, 0) + ZEND_ARG_INFO(0, params) +ZEND_END_ARG_INFO() + +#define arginfo_stream_filter_append arginfo_stream_filter_prepend + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_filter_remove, 0, 1, _IS_BOOL, 0) + ZEND_ARG_INFO(0, stream_filter) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_client, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, remote_socket, IS_STRING, 0) + ZEND_ARG_INFO(1, errno) + ZEND_ARG_INFO(1, errstr) + ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_server, 0, 0, 1) + ZEND_ARG_TYPE_INFO(0, local_socket, IS_STRING, 0) + ZEND_ARG_INFO(1, errno) + ZEND_ARG_INFO(1, errstr) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_INFO(0, context) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_socket_accept, 0, 0, 1) + ZEND_ARG_INFO(0, server_socket) + ZEND_ARG_TYPE_INFO(0, timeout, IS_DOUBLE, 0) + ZEND_ARG_INFO(1, peername) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_get_name, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, handle) + ZEND_ARG_TYPE_INFO(0, want_peer, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_recvfrom, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_INFO(1, address) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_sendto, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_enable_crypto, 0, 2, MAY_BE_LONG|MAY_BE_BOOL) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, crypto_type, IS_LONG, 1) + ZEND_ARG_INFO(0, session_stream) +ZEND_END_ARG_INFO() + +#if defined(HAVE_SHUTDOWN) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_socket_shutdown, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, how, IS_LONG, 0) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_SOCKETPAIR +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_socket_pair, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE) + ZEND_ARG_TYPE_INFO(0, domain, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, protocol, IS_LONG, 0) +ZEND_END_ARG_INFO() +#endif + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_copy_to_stream, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) + ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, dest) + ZEND_ARG_TYPE_INFO(0, maxlength, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_contents, 0, 1, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, handle) + ZEND_ARG_TYPE_INFO(0, maxlength, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_supports_lock, 0, 1, _IS_BOOL, 0) + ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_write_buffer, 0, 2, IS_LONG, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, buffer, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#define arginfo_stream_set_read_buffer arginfo_stream_set_write_buffer + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_blocking, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_get_meta_data, 0, 1, IS_ARRAY, 0) + ZEND_ARG_INFO(0, stream) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_stream_get_line, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) + ZEND_ARG_INFO(0, handle) + ZEND_ARG_TYPE_INFO(0, max_length, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, ending, IS_STRING, 0) +ZEND_END_ARG_INFO() + +#define arginfo_stream_resolve_include_path arginfo_filetype + +#define arginfo_stream_get_wrappers arginfo_net_get_interfaces + +#define arginfo_stream_get_transports arginfo_net_get_interfaces + +#define arginfo_stream_is_local arginfo_stream_supports_lock + +#define arginfo_stream_isatty arginfo_stream_supports_lock + +#if defined(PHP_WIN32) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sapi_windows_vt100_support, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) +ZEND_END_ARG_INFO() +#endif + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_chunk_size, 0, 2, IS_LONG, 0) + ZEND_ARG_INFO(0, stream) + ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0) +ZEND_END_ARG_INFO() + +#if HAVE_SYS_TIME_H || defined(PHP_WIN32) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_set_timeout, 0, 2, _IS_BOOL, 0) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, microseconds, IS_LONG, 0) +ZEND_END_ARG_INFO() +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gettype, 0, 1, IS_STRING, 0) ZEND_ARG_INFO(0, var) ZEND_END_ARG_INFO() @@ -1901,6 +2088,17 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_get_headers, 0, 1, MAY_BE_ARRAY| ZEND_ARG_INFO(0, context) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_php_user_filter_filter, 0, 0, 4) + ZEND_ARG_INFO(0, in) + ZEND_ARG_INFO(0, out) + ZEND_ARG_INFO(1, consumed) + ZEND_ARG_INFO(0, closing) +ZEND_END_ARG_INFO() + +#define arginfo_class_php_user_filter_onCreate arginfo_tmpfile + +#define arginfo_class_php_user_filter_onClose arginfo_tmpfile + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stream_bucket_make_writeable, 0, 1, IS_OBJECT, 1) ZEND_ARG_INFO(0, brigade) ZEND_END_ARG_INFO()