com php-src: zend_func_info: Remove null from met hods with non-null return type: ext/opcache/Optimiz er/zend_func_info.c

From: Date: Mon, 17 Jun 2019 10:36:30 +0000
Subject: com php-src: zend_func_info: Remove null from met hods with non-null return type: ext/opcache/Optimiz er/zend_func_info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106825@lists.php.net to get a copy of this message
Commit: 38c0f6056b18d84073d44e5d4a8e76cd56e5beb0 Author: Tyson Andre <tysonandre775@hotmail.com> Sat, 15 Jun 2019 17:12:18 -0400 Committer: Nikita Popov <nikita.ppv@gmail.com> Mon, 17 Jun 2019 12:36:30 +0200 Parents: 6a2a449cd5d7a99d0568b3bd51d0fc914d36be05 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=38c0f6056b18d84073d44e5d4a8e76cd56e5beb0 Log: zend_func_info: Remove null from methods with non-null return type Detected by parsing the strings in zend_func_info.c, looping over them and checking for inconsistencies with Reflection. (new ReflectionFunction('str_shuffle')->getReturnType()) would be a non-null 'string', for example. - e.g. that change was made in 7393777da97977db5a4786a4dbe765bde4bc3921 for php 8.0 Closes GH-4269. Changed paths: M ext/opcache/Optimizer/zend_func_info.c Diff: diff --git a/ext/opcache/Optimizer/zend_func_info..c b/ext/opcache/Optimizer/zend_func_info.c index 684831b..2479c3b 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -201,7 +201,7 @@ static const func_info_t func_infos[] = { F1("strstr", MAY_BE_FALSE | MAY_BE_STRING), F1("stristr", MAY_BE_FALSE | MAY_BE_STRING), F1("strrchr", MAY_BE_FALSE | MAY_BE_STRING), - F1("str_shuffle", MAY_BE_NULL | MAY_BE_STRING), + F1("str_shuffle", MAY_BE_STRING), F1("str_word_count", MAY_BE_FALSE | MAY_BE_LONG | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("str_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING), @@ -385,8 +385,8 @@ static const func_info_t func_infos[] = { F1("quoted_printable_encode", MAY_BE_STRING), F1("convert_cyr_string", MAY_BE_STRING), F1("get_current_user", MAY_BE_STRING), - F0("set_time_limit", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), - F0("header_register_callback", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE), + F0("set_time_limit", MAY_BE_FALSE | MAY_BE_TRUE), + F0("header_register_callback", MAY_BE_FALSE | MAY_BE_TRUE), F1("get_cfg_var", MAY_BE_FALSE | MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), F0("magic_quotes_runtime", MAY_BE_FALSE), F0("set_magic_quotes_runtime", MAY_BE_FALSE), @@ -641,10 +641,10 @@ static const func_info_t func_infos[] = { F1("ob_get_clean", MAY_BE_FALSE | MAY_BE_STRING), F0("ob_get_length", MAY_BE_FALSE | MAY_BE_LONG), F0("ob_get_level", MAY_BE_LONG), - F1("ob_get_status", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), + F1("ob_get_status", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_LONG | MAY_BE_ARRAY_OF_STRING | MAY_BE_ARRAY_OF_ARRAY), FN("ob_get_contents", MAY_BE_FALSE | MAY_BE_STRING), F0("ob_implicit_flush", MAY_BE_NULL), - F1("ob_list_handlers", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), + F1("ob_list_handlers", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING), F0("ksort", MAY_BE_FALSE | MAY_BE_TRUE), F0("krsort", MAY_BE_FALSE | MAY_BE_TRUE), F0("natsort", MAY_BE_FALSE | MAY_BE_TRUE),

« previous php.cvs (#106825) next »