Skip to content

Commit 673b4e8

Browse files
authored
ext/standard: change highlight_string()/print_r stub return type from string|bool to string|true (#14959)
* ext/standard: change `highlight_string()` return type from `string|bool` to `string|true` * ext/standard: change `print_r` return type from `string|bool` to `string|true`
1 parent 913157f commit 673b4e8

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,8 @@ PHP 8.4 UPGRADE NOTES
565565
one digit.
566566
. output_add_rewrite_var() now uses url_rewriter.hosts instead of
567567
session.trans_sid_hosts for selecting hosts that will be rewritten.
568+
. highlight_string() now has a return type of string|true instead of string|bool.
569+
. print_r() now has a return type of string|true instead of string|bool.
568570

569571
========================================
570572
6. New Functions

Zend/Optimizer/zend_func_infos.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,11 @@ static const func_info_t func_infos[] = {
456456
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),
457457
F1("highlight_file", MAY_BE_STRING|MAY_BE_BOOL),
458458
F1("php_strip_whitespace", MAY_BE_STRING),
459-
F1("highlight_string", MAY_BE_STRING|MAY_BE_BOOL),
459+
F1("highlight_string", MAY_BE_STRING|MAY_BE_TRUE),
460460
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),
461461
F1("set_include_path", MAY_BE_STRING|MAY_BE_FALSE),
462462
F1("get_include_path", MAY_BE_STRING|MAY_BE_FALSE),
463-
F1("print_r", MAY_BE_STRING|MAY_BE_BOOL),
463+
F1("print_r", MAY_BE_STRING|MAY_BE_TRUE),
464464
#if defined(HAVE_GETSERVBYPORT)
465465
F1("getservbyport", MAY_BE_STRING|MAY_BE_FALSE),
466466
#endif

ext/standard/basic_functions.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ function show_source(string $filename, bool $return = false): string|bool {}
20242024
function php_strip_whitespace(string $filename): string {}
20252025

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

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

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

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

20552055
function connection_aborted(): int {}
20562056

ext/standard/basic_functions_arginfo.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)