diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h index 632e7bf98bad..193954f7d1bf 100644 --- a/Zend/Optimizer/zend_func_infos.h +++ b/Zend/Optimizer/zend_func_infos.h @@ -580,7 +580,7 @@ static const func_info_t func_infos[] = { FN("stream_context_set_default", MAY_BE_RESOURCE), FN("stream_filter_prepend", MAY_BE_RESOURCE|MAY_BE_FALSE), FN("stream_filter_append", MAY_BE_RESOURCE|MAY_BE_FALSE), - F1("stream_socket_client", MAY_BE_RESOURCE|MAY_BE_FALSE), + FN("stream_socket_client", MAY_BE_RESOURCE|MAY_BE_FALSE), F1("stream_socket_server", MAY_BE_RESOURCE|MAY_BE_FALSE), F1("stream_socket_accept", MAY_BE_RESOURCE|MAY_BE_FALSE), F1("stream_socket_recvfrom", MAY_BE_STRING|MAY_BE_FALSE), diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 091b5cbac22b..11b5605f8097 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -3430,7 +3430,6 @@ function stream_filter_remove($stream_filter): bool {} * @param string $error_message * @param resource|null $context * @return resource|false - * @refcount 1 */ function stream_socket_client(string $address, &$error_code = null, &$error_message = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null) {} diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 666957db7120..054d88e62e54 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 5eeeaf1f292c72e4553dabc5a64f27781bf57d86 */ + * Stub hash: 5ee76c4c9c8b2dfb6618bbfec91b166bf9ca0c75 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) diff --git a/ext/standard/tests/streams/stream_socket_client_persistent_jit.phpt b/ext/standard/tests/streams/stream_socket_client_persistent_jit.phpt new file mode 100644 index 000000000000..45f8dbb84640 --- /dev/null +++ b/ext/standard/tests/streams/stream_socket_client_persistent_jit.phpt @@ -0,0 +1,24 @@ +--TEST-- +stream_socket_client(): JIT must not free a persistent stream returned twice +--EXTENSIONS-- +opcache +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.jit=function +opcache.jit_buffer_size=64M +opcache.file_update_protection=0 +--FILE-- + +--EXPECT-- +bool(true)