]> granicus.if.org Git - php/commitdiff
Fix print_r return types in opcache
authorTyson Andre <tysonandre775@hotmail.com>
Sat, 30 Nov 2019 19:14:06 +0000 (14:14 -0500)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 4 Dec 2019 06:16:32 +0000 (07:16 +0100)
https://www.php.net/print_r

> When the return parameter is TRUE, this function will return a string.
> Otherwise, the return value is TRUE.

ext/opcache/Optimizer/zend_func_info.c

index 3eea2c197eff6216003c52f176a9df456a7596f0..ba5ef82c4cd0e83223dec6dad9a50be136b86558 100644 (file)
@@ -533,7 +533,7 @@ static const func_info_t func_infos[] = {
        F0("var_dump",                     MAY_BE_NULL),
        F1("var_export",                   MAY_BE_NULL | MAY_BE_STRING),
        F0("debug_zval_dump",              MAY_BE_NULL),
-       F1("print_r",                      MAY_BE_FALSE | MAY_BE_STRING),
+       F1("print_r",                      MAY_BE_TRUE | MAY_BE_STRING),
        F0("memory_get_usage",             MAY_BE_FALSE | MAY_BE_LONG),
        F0("memory_get_peak_usage",        MAY_BE_FALSE | MAY_BE_LONG),
        F0("register_shutdown_function",   MAY_BE_NULL | MAY_BE_FALSE),