Skip to content

ext/standard: change highlight_string()/print_r stub return type from string|bool to string|true #14959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,8 @@ PHP 8.4 UPGRADE NOTES
one digit.
. output_add_rewrite_var() now uses url_rewriter.hosts instead of
session.trans_sid_hosts for selecting hosts that will be rewritten.
. highlight_string() now has a return type of string|true instead of string|bool.
. print_r() now has a return type of string|true instead of string|bool.

========================================
6. New Functions
Expand Down
4 changes: 2 additions & 2 deletions Zend/Optimizer/zend_func_infos.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ static const func_info_t func_infos[] = {
F1("error_get_last", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_NULL),
F1("highlight_file", MAY_BE_STRING|MAY_BE_BOOL),
F1("php_strip_whitespace", MAY_BE_STRING),
F1("highlight_string", MAY_BE_STRING|MAY_BE_BOOL),
F1("highlight_string", MAY_BE_STRING|MAY_BE_TRUE),
F1("ini_get_all", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
F1("set_include_path", MAY_BE_STRING|MAY_BE_FALSE),
F1("get_include_path", MAY_BE_STRING|MAY_BE_FALSE),
F1("print_r", MAY_BE_STRING|MAY_BE_BOOL),
F1("print_r", MAY_BE_STRING|MAY_BE_TRUE),
#if defined(HAVE_GETSERVBYPORT)
F1("getservbyport", MAY_BE_STRING|MAY_BE_FALSE),
#endif
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/basic_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ function show_source(string $filename, bool $return = false): string|bool {}
function php_strip_whitespace(string $filename): string {}

/** @refcount 1 */
function highlight_string(string $string, bool $return = false): string|bool {}
function highlight_string(string $string, bool $return = false): string|true {}

function ini_get(string $option): string|false {}

Expand All @@ -2050,7 +2050,7 @@ function set_include_path(string $include_path): string|false {}
function get_include_path(): string|false {}

/** @refcount 1 */
function print_r(mixed $value, bool $return = false): string|bool {}
function print_r(mixed $value, bool $return = false): string|true {}

function connection_aborted(): int {}

Expand Down
6 changes: 3 additions & 3 deletions ext/standard/basic_functions_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading