From 0b77ed2ac7b53bf4f4dc4fdad1def2cc34b6e60a Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Fri, 25 Jun 2021 22:01:11 +0200 Subject: [PATCH 1/3] Deprecate bool to string coercion in weak type mode --- Zend/tests/017.phpt | 2 + .../tests/type_declarations/scalar_basic.phpt | 2 + .../scalar_return_basic.phpt | 2 + .../scalar_return_basic_64bit.phpt | 2 + .../union_types/type_checking_weak.phpt | 4 +- Zend/zend_API.c | 3 + ...ettext_bind_textdomain_codeset-retval.phpt | 8 +- ext/iconv/tests/bug48147.phpt | 4 + ext/iconv/tests/iconv_mime_decode.phpt | 2 + ext/iconv/tests/iconv_stream_filter.phpt | 2 +- ext/intl/tests/locale_bug66289.phpt | 9 +- ext/intl/tests/locale_get_display_name5.phpt | 2 +- ext/intl/tests/locale_get_display_name7.phpt | 4 +- ext/intl/tests/locale_get_display_name8.phpt | 2 +- ext/json/tests/bug69187.phpt | 5 +- ext/mbstring/tests/bug43994.phpt | 10 +- ext/mbstring/tests/bug43998.phpt | 10 +- .../tests/mb_ereg_replace_variation1.phpt | 10 +- ext/mbstring/tests/mbregex_stack_limit2.phpt | 2 + .../mysqli_debug_mysqlnd_control_string.phpt | 2 + .../tests/mysqli_prepare_no_object.phpt | 5 +- ext/openssl/tests/bug38261.phpt | 4 +- ext/pdo/tests/bug_38394.phpt | 3 +- ext/pdo/tests/bug_43130.phpt | 11 +- ext/pdo/tests/bug_44861.phpt | 3 +- ext/pdo/tests/bug_69356.phpt | 3 +- ext/pdo/tests/bug_71885.phpt | 7 +- ext/pdo/tests/pdo_016.phpt | 3 +- ext/pdo/tests/pdo_016a.phpt | 3 +- ext/pdo/tests/pdo_033.phpt | 3 +- .../tests/pdo_dsn_containing_credentials.phpt | 3 +- ext/pdo/tests/pdo_test.inc | 2 +- ext/pdo_dblib/tests/pdo_dblib_quote.phpt | 3 + ext/pdo_mysql/tests/config.inc | 4 +- ext/reflection/tests/005.phpt | 6 +- .../ReflectionClass_constructor_002.phpt | 2 + .../ReflectionClass_getConstant_error.phpt | 4 +- .../tests/ReflectionClass_getMethod_002.phpt | 2 + .../ReflectionClass_getProperty_002.phpt | 2 + .../ReflectionClass_hasConstant_002.phpt | 4 +- .../tests/ReflectionClass_hasMethod_002.phpt | 4 +- .../ReflectionClass_hasProperty_002.phpt | 4 +- .../ReflectionMethod_constructor_error1.phpt | 6 + ext/reflection/tests/bug64936.phpt | 5 +- ext/session/tests/010.phpt | 3 +- ext/session/tests/bug79031.phpt | 2 + .../tests/session_encode_variation8.phpt | 2 + .../tests/session_set_save_handler_basic.phpt | 2 + .../session_set_save_handler_closures.phpt | 2 + .../session_set_save_handler_variation1.phpt | 2 + ext/sockets/tests/socket_export_stream-1.phpt | 2 +- ext/sockets/tests/socket_import_stream-1.phpt | 2 +- ext/standard/tests/file/005_variation2.phpt | 8 + .../tests/file/file_exists_variation1.phpt | 4 +- .../file/file_get_contents_variation8.phpt | 4 + .../file/file_put_contents_variation8.phpt | 6 + .../tests/file/filegroup_variation2.phpt | 4 + .../tests/file/fileinode_variation2.phpt | 4 + .../tests/file/fileowner_variation2.phpt | 4 + .../tests/file/fileperms_variation2.phpt | 4 + .../tests/file/filesize_variation5.phpt | 2 + ext/standard/tests/file/fnmatch_basic.phpt | 10 +- .../tests/file/fnmatch_variation.phpt | 146 +++++++++++++++- ext/standard/tests/file/fread_variation2.phpt | 2 +- ext/standard/tests/file/fread_variation4.phpt | 10 +- ext/standard/tests/file/glob_variation.phpt | 14 ++ .../tests/file/is_dir_variation3.phpt | 6 +- .../tests/file/is_executable_variation3.phpt | 6 +- .../tests/file/is_readable_variation3.phpt | 6 +- .../tests/file/is_writable_variation3.phpt | 10 +- .../tests/file/lstat_stat_variation22.phpt | 4 + .../tests/file/pathinfo_variaton.phpt | 22 ++- ext/standard/tests/file/readfile_error.phpt | 2 + .../tests/file/readfile_variation10.phpt | 4 + .../tests/file/readlink_variation1.phpt | 4 + .../tests/file/rename_variation13.phpt | 14 ++ .../symlink_link_linkinfo_is_link_error1.phpt | 6 + .../symlink_link_linkinfo_is_link_error2.phpt | 6 + .../tests/file/tempnam_variation3.phpt | 4 + .../tests/file/tempnam_variation7.phpt | 4 + ext/standard/tests/file/unlink_error.phpt | 4 + .../escapeshellarg_variation1.phpt | 10 +- .../get_cfg_var_variation2.phpt | 10 +- .../tests/general_functions/uniqid_basic.phpt | 12 ++ .../tests/math/base_convert_variation1.phpt | 8 + ext/standard/tests/math/bindec_basic.phpt | 4 + .../tests/math/bindec_basic_64bit.phpt | 4 + .../tests/math/bindec_variation1.phpt | 8 + .../tests/math/bindec_variation1_64bit.phpt | 8 + ext/standard/tests/math/hexdec_basic.phpt | 4 + .../tests/math/hexdec_basic_64bit.phpt | 4 + .../tests/math/hexdec_variation1.phpt | 8 + .../tests/math/hexdec_variation1_64bit.phpt | 8 + ext/standard/tests/math/octdec_basic.phpt | 4 + .../tests/math/octdec_basic_64bit.phpt | 4 + .../tests/math/octdec_variation1.phpt | 8 + ext/standard/tests/network/inet_ipv6.phpt | 4 +- .../tests/streams/stream_socket_pair.phpt | 2 +- .../tests/strings/chop_variation5.phpt | 4 +- ext/standard/tests/strings/implode1.phpt | 4 + .../tests/strings/join_variation1.phpt | 10 +- .../tests/strings/join_variation4.phpt | 4 + ext/standard/tests/strings/lcfirst.phpt | 4 + ext/standard/tests/strings/ltrim.phpt | 4 +- .../strings/quoted_printable_encode_001.phpt | 4 +- ext/standard/tests/strings/rtrim.phpt | 2 + .../tests/strings/sprintf_variation1.phpt | 26 ++- ext/standard/tests/strings/str_pad.phpt | 70 +++++++- ext/standard/tests/strings/str_repeat.phpt | 14 +- .../tests/strings/str_replace_variation1.phpt | 4 + .../tests/strings/str_replace_variation2.phpt | 4 + ext/standard/tests/strings/strcasecmp.phpt | 159 +++++++++++++++--- ext/standard/tests/strings/strcmp.phpt | 127 +++++++++++--- .../tests/strings/strip_tags_variation2.phpt | 10 +- ext/standard/tests/strings/stripos.phpt | 14 +- .../tests/strings/stripos_variation1.phpt | 10 +- .../tests/strings/stripos_variation2.phpt | 10 +- .../tests/strings/stristr_variation2.phpt | 10 +- ext/standard/tests/strings/strlen.phpt | 7 +- .../strings/strnatcasecmp_variation1.phpt | 4 +- ext/standard/tests/strings/strpos.phpt | 7 +- .../tests/strings/strrchr_variation1.phpt | 4 + .../tests/strings/strrchr_variation2.phpt | 6 +- .../tests/strings/strripos_variation1.phpt | 18 +- .../tests/strings/strripos_variation2.phpt | 18 +- .../tests/strings/strrpos_variation2.phpt | 10 +- .../tests/strings/strrpos_variation7.phpt | 4 +- ext/standard/tests/strings/strstr.phpt | 4 + ext/standard/tests/strings/strtolower.phpt | 4 + ext/standard/tests/strings/strtoupper1.phpt | 4 + .../tests/strings/strtr_variation4.phpt | 10 +- .../tests/strings/strtr_variation6.phpt | 8 + .../tests/strings/strtr_variation8.phpt | 8 + ext/standard/tests/strings/trim1.phpt | 2 + ext/standard/tests/strings/ucfirst.phpt | 4 + ext/zlib/tests/bug71417.phpt | 8 + run-tests.php | 6 +- sapi/cli/tests/bug61977.phpt | 2 +- sapi/cli/tests/upload_2G.phpt | 3 +- sapi/fpm/tests/tester.inc | 2 +- 140 files changed, 1133 insertions(+), 138 deletions(-) diff --git a/Zend/tests/017.phpt b/Zend/tests/017.phpt index 619365cbce17f..acf825f37240f 100644 --- a/Zend/tests/017.phpt +++ b/Zend/tests/017.phpt @@ -51,6 +51,8 @@ string(5) "array" int(%d) string(5) "array" int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(5) "array" int(%d) diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt index c69d17c8c7004..73ebf5c85d2bf 100644 --- a/Zend/tests/type_declarations/scalar_basic.phpt +++ b/Zend/tests/type_declarations/scalar_basic.phpt @@ -197,9 +197,11 @@ string(%d) "%d" string(3) "NAN" *** Trying bool(true) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(1) "1" *** Trying bool(false) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(0) "" *** Trying NULL diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt index 0cdce348c580c..8027ebf228c9d 100644 --- a/Zend/tests/type_declarations/scalar_return_basic.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic.phpt @@ -158,8 +158,10 @@ string(10) "2147483647" *** Trying float(NAN) string(3) "NAN" *** Trying bool(true) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line %d string(1) "1" *** Trying bool(false) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line %d string(0) "" *** Trying NULL *** Caught {closure}(): Return value must be of type string, null returned in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt index 644ff58299440..25c953d4380f7 100644 --- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt @@ -158,8 +158,10 @@ string(19) "9223372036854775807" *** Trying float(NAN) string(3) "NAN" *** Trying bool(true) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(1) "1" *** Trying bool(false) +E_DEPRECATED: Implicit bool to string coercion is deprecated on line 16 string(0) "" *** Trying NULL *** Caught {closure}(): Return value must be of type string, null returned in %s on line %d diff --git a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt index 351a3e9e78ede..04444979ab86e 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt @@ -181,8 +181,8 @@ INF => "INF" "42x" => "42x" "x" => "x" "" => "" -true => "1" -false => "" +true => "1" (Implicit bool to string coercion is deprecated) +false => "" (Implicit bool to string coercion is deprecated) null => Argument ... must be of type array|string, null given [] => [] new stdClass => Argument ... must be of type array|string, stdClass given diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ca4ca0caffbd7..775d5f0c731f5 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -656,6 +656,9 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **des if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("string", arg_num)) { return 0; } + if (UNEXPECTED(Z_TYPE_P(arg) == IS_TRUE || Z_TYPE_P(arg) == IS_FALSE)) { + zend_error(E_DEPRECATED, "Implicit bool to string coercion is deprecated"); + } convert_to_string(arg); *dest = Z_STR_P(arg); } else if (UNEXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) { diff --git a/ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt b/ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt index 47c821648fccb..f3fbe302bf526 100644 --- a/ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt +++ b/ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt @@ -9,10 +9,10 @@ gettext echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(5) "UTF-8" Done ---CREDITS-- -Florian Holzhauer fh-pt@fholzhauer.de -PHP Testfest Berlin 2009-05-09 diff --git a/ext/iconv/tests/bug48147.phpt b/ext/iconv/tests/bug48147.phpt index ce304eecfb3c7..dbde8413a022e 100644 --- a/ext/iconv/tests/bug48147.phpt +++ b/ext/iconv/tests/bug48147.phpt @@ -20,8 +20,12 @@ bool(false) string(10) "aa%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(8) "%C3%B8aa" Notice: iconv(): Detected an incomplete multibyte character in input string in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" diff --git a/ext/iconv/tests/iconv_mime_decode.phpt b/ext/iconv/tests/iconv_mime_decode.phpt index 00d8b2244bf6c..2b0af0d20db38 100644 --- a/ext/iconv/tests/iconv_mime_decode.phpt +++ b/ext/iconv/tests/iconv_mime_decode.phpt @@ -70,12 +70,14 @@ do_regression_test(); (32) "Subject: Prüfung PrüfungkůÔńÓlet" (31) "Subject: PrüfungPrüfungkůÔńÓlet" 2: iconv_mime_decode(): Malformed string +8192: Implicit bool to string coercion is deprecated (0) "" (27) "From: サンプル文字列サンプル文字列日本語テキスト" (31) "Subject: PrüfungPrüfungkůÔńÓlet" (32) "Subject: Prüfung PrüfungkůÔńÓlet" (100) "Subject: =?ISO-8859-1?Q?Pr=FCfung?==?ISO-8859-1*de_DE?Q?Pr=FCfung?==?ISO-8859-2?Q?k=F9=D4=F1=D3let?=" 2: iconv_mime_decode(): Malformed string +8192: Implicit bool to string coercion is deprecated (0) "" (27) "From: サンプル文字列サンプル文字列日本語テキスト" (31) "Subject: PrüfungPrüfungkůÔńÓlet" diff --git a/ext/iconv/tests/iconv_stream_filter.phpt b/ext/iconv/tests/iconv_stream_filter.phpt index 1d642a7514256..dfe535d0e5bf0 100644 --- a/ext/iconv/tests/iconv_stream_filter.phpt +++ b/ext/iconv/tests/iconv_stream_filter.phpt @@ -22,7 +22,7 @@ fclose($fp); $fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'string.rot13'); // this will make conversion fail. stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP'); -var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf"); +var_dump(bin2hex((string) @fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf"); var_dump(bin2hex(fread($fp, 5)) != "69636f6e76"); var_dump(bin2hex(fread($fp, 1)) != "0a"); fclose($fp); diff --git a/ext/intl/tests/locale_bug66289.phpt b/ext/intl/tests/locale_bug66289.phpt index a8939a2d78239..6cef17a378d45 100644 --- a/ext/intl/tests/locale_bug66289.phpt +++ b/ext/intl/tests/locale_bug66289.phpt @@ -18,8 +18,15 @@ $availableLocales = array(Locale::getDefault()); var_dump(locale_lookup($availableLocales, false, true)); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(5) "fr_fr" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(5) "en_us" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(5) "fr_fr" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(5) "de_de" diff --git a/ext/intl/tests/locale_get_display_name5.phpt b/ext/intl/tests/locale_get_display_name5.phpt index 62e46099da27f..d9b9b700cc97d 100644 --- a/ext/intl/tests/locale_get_display_name5.phpt +++ b/ext/intl/tests/locale_get_display_name5.phpt @@ -90,7 +90,7 @@ function ut_main() $res_str .= "locale='$locale'\n"; foreach( $disp_locales as $disp_locale ) { - $scr = ut_loc_get_display_name( $locale ,$disp_locale ); + $scr = (string) ut_loc_get_display_name( $locale ,$disp_locale ); $scr = str_replace(array('(', ')'), '#', $scr); $res_str .= "disp_locale=$disp_locale : display_name=$scr"; $res_str .= "\n"; diff --git a/ext/intl/tests/locale_get_display_name7.phpt b/ext/intl/tests/locale_get_display_name7.phpt index 8b0cd0c536f1a..22e11c80c8b20 100644 --- a/ext/intl/tests/locale_get_display_name7.phpt +++ b/ext/intl/tests/locale_get_display_name7.phpt @@ -90,8 +90,8 @@ function ut_main() $res_str .= "locale='$locale'\n"; foreach( $disp_locales as $disp_locale ) { - $scr = ut_loc_get_display_name( $locale ,$disp_locale ); - $scr = str_replace(array('(', ')'), '#', $scr); + $scr = (string) ut_loc_get_display_name($locale, $disp_locale); + $scr = str_replace(array('(', ')'), '#', $scr); $res_str .= "disp_locale=$disp_locale : display_name=$scr"; $res_str .= "\n"; } diff --git a/ext/intl/tests/locale_get_display_name8.phpt b/ext/intl/tests/locale_get_display_name8.phpt index b6b855c6d8eca..da476a01c41e3 100644 --- a/ext/intl/tests/locale_get_display_name8.phpt +++ b/ext/intl/tests/locale_get_display_name8.phpt @@ -89,7 +89,7 @@ function ut_main() $res_str .= "locale='$locale'\n"; foreach( $disp_locales as $disp_locale ) { - $scr = ut_loc_get_display_name( $locale ,$disp_locale ); + $scr = (string) ut_loc_get_display_name( $locale ,$disp_locale ); $scr = str_replace(array('(', ')'), '#', $scr); $res_str .= "disp_locale=$disp_locale : display_name=$scr"; $res_str .= "\n"; diff --git a/ext/json/tests/bug69187.phpt b/ext/json/tests/bug69187.phpt index 4d076c4b50b17..ea5f9f2b9a14a 100644 --- a/ext/json/tests/bug69187.phpt +++ b/ext/json/tests/bug69187.phpt @@ -26,7 +26,8 @@ var_dump(json_last_error()); json_decode("\"\x00\""); var_dump(json_last_error()); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d NULL int(4) NULL @@ -35,6 +36,8 @@ int(0) int(0) int(1) int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) int(0) int(5) diff --git a/ext/mbstring/tests/bug43994.phpt b/ext/mbstring/tests/bug43994.phpt index 26f641f6d3d7e..87f15f05ead0e 100644 --- a/ext/mbstring/tests/bug43994.phpt +++ b/ext/mbstring/tests/bug43994.phpt @@ -40,18 +40,26 @@ foreach($inputs as $input) { $iterator++; }; ?> ---EXPECT-- +--EXPECTF-- -- Iteration 1 -- Without $regs arg: + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_ereg(): Argument #1 ($pattern) must not be empty With $regs arg: + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_ereg(): Argument #1 ($pattern) must not be empty NULL -- Iteration 2 -- Without $regs arg: + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_ereg(): Argument #1 ($pattern) must not be empty With $regs arg: + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_ereg(): Argument #1 ($pattern) must not be empty NULL diff --git a/ext/mbstring/tests/bug43998.phpt b/ext/mbstring/tests/bug43998.phpt index 112ab88728341..1bf0d07175b6d 100644 --- a/ext/mbstring/tests/bug43998.phpt +++ b/ext/mbstring/tests/bug43998.phpt @@ -29,7 +29,7 @@ foreach($inputs as $input) { } ?> ---EXPECT-- +--EXPECTF-- -- Iteration 1 -- mb_strtolower(): Argument #2 ($encoding) must be a valid encoding, "12345" given mb_strtoupper(): Argument #2 ($encoding) must be a valid encoding, "12345" given @@ -39,11 +39,19 @@ mb_strtolower(): Argument #2 ($encoding) must be a valid encoding, "1.23456789E- mb_strtoupper(): Argument #2 ($encoding) must be a valid encoding, "1.23456789E-9" given -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_strtolower(): Argument #2 ($encoding) must be a valid encoding, "1" given + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_strtoupper(): Argument #2 ($encoding) must be a valid encoding, "1" given -- Iteration 4 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_strtolower(): Argument #2 ($encoding) must be a valid encoding, "" given + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d mb_strtoupper(): Argument #2 ($encoding) must be a valid encoding, "" given -- Iteration 5 -- diff --git a/ext/mbstring/tests/mb_ereg_replace_variation1.phpt b/ext/mbstring/tests/mb_ereg_replace_variation1.phpt index 7996d89734f5d..ec343351e66da 100644 --- a/ext/mbstring/tests/mb_ereg_replace_variation1.phpt +++ b/ext/mbstring/tests/mb_ereg_replace_variation1.phpt @@ -77,7 +77,7 @@ foreach($inputs as $input) { echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing mb_ereg_replace() : usage variations *** -- Iteration 1 -- @@ -108,15 +108,23 @@ string(10) "string_val" string(10) "string_val" -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "string_val" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "string_val" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(120) "string_valsstring_valtstring_valrstring_valistring_valnstring_valgstring_val_string_valvstring_valastring_vallstring_val" -- Iteration 14 -- diff --git a/ext/mbstring/tests/mbregex_stack_limit2.phpt b/ext/mbstring/tests/mbregex_stack_limit2.phpt index c0ced11f200b2..4b5788470569b 100644 --- a/ext/mbstring/tests/mbregex_stack_limit2.phpt +++ b/ext/mbstring/tests/mbregex_stack_limit2.phpt @@ -29,5 +29,7 @@ echo 'OK'; ?> --EXPECTF-- Warning: mb_ereg_replace(): mbregex search failure in php_mbereg_replace_exec(): match-stack limit over in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" OK diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt index 8dc6a38527970..bf01b359e3617 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt @@ -227,4 +227,6 @@ if (!$IS_MYSQLND) ?> --EXPECTF-- [083][control string 'n:O,%smysqli_debug_phpt.trace'] Trace file has not been written. + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d done%s diff --git a/ext/mysqli/tests/mysqli_prepare_no_object.phpt b/ext/mysqli/tests/mysqli_prepare_no_object.phpt index ae41a2a4d3208..b8b823b3a8a4b 100644 --- a/ext/mysqli/tests/mysqli_prepare_no_object.phpt +++ b/ext/mysqli/tests/mysqli_prepare_no_object.phpt @@ -38,9 +38,12 @@ require_once('skipifconnectfailure.inc'); ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d a) [1065] Query was empty b) [1065] Query was empty + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d c) [1065] Query was empty c) [1065] Query was empty done! diff --git a/ext/openssl/tests/bug38261.phpt b/ext/openssl/tests/bug38261.phpt index 6064380c8bca2..14427ea2b7782 100644 --- a/ext/openssl/tests/bug38261.phpt +++ b/ext/openssl/tests/bug38261.phpt @@ -35,9 +35,11 @@ try { } ?> ---EXPECT-- +--EXPECTF-- bool(false) bool(false) openssl_x509_parse(): Argument #1 ($certificate) must be of type OpenSSLCertificate|string, array given + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) openssl_x509_parse(): Argument #1 ($certificate) must be of type OpenSSLCertificate|string, stdClass given diff --git a/ext/pdo/tests/bug_38394.phpt b/ext/pdo/tests/bug_38394.phpt index 56bcb0dc1fa35..c76ce17d5da43 100644 --- a/ext/pdo/tests/bug_38394.phpt +++ b/ext/pdo/tests/bug_38394.phpt @@ -6,7 +6,8 @@ pdo diff --git a/ext/pdo/tests/bug_43130.phpt b/ext/pdo/tests/bug_43130.phpt index 541e1b15a5a53..ddd0f16d88ff9 100644 --- a/ext/pdo/tests/bug_43130.phpt +++ b/ext/pdo/tests/bug_43130.phpt @@ -6,11 +6,12 @@ pdo diff --git a/ext/pdo/tests/bug_44861.phpt b/ext/pdo/tests/bug_44861.phpt index bc0f902f684cc..014e21f867ceb 100644 --- a/ext/pdo/tests/bug_44861.phpt +++ b/ext/pdo/tests/bug_44861.phpt @@ -9,7 +9,8 @@ if (false == $dir) die('skip no driver'); $allowed = array('oci', 'pgsql'); $ok = false; foreach ($allowed as $driver) { - if (!strncasecmp(getenv('PDOTEST_DSN'), $driver, strlen($driver))) { + $dsn = (string) getenv('PDOTEST_DSN'); + if (!strncasecmp($dsn, $driver, strlen($driver))) { $ok = true; } } diff --git a/ext/pdo/tests/bug_69356.phpt b/ext/pdo/tests/bug_69356.phpt index a2cf219a857ce..d47ab4091a91f 100644 --- a/ext/pdo/tests/bug_69356.phpt +++ b/ext/pdo/tests/bug_69356.phpt @@ -6,7 +6,8 @@ pdo diff --git a/ext/pdo/tests/bug_71885.phpt b/ext/pdo/tests/bug_71885.phpt index 9281de8d89a0d..e1de54b6eed2f 100644 --- a/ext/pdo/tests/bug_71885.phpt +++ b/ext/pdo/tests/bug_71885.phpt @@ -6,9 +6,10 @@ pdo diff --git a/ext/pdo/tests/pdo_016.phpt b/ext/pdo/tests/pdo_016.phpt index 09e713a64fda7..33a98a117d611 100644 --- a/ext/pdo/tests/pdo_016.phpt +++ b/ext/pdo/tests/pdo_016.phpt @@ -6,7 +6,8 @@ pdo diff --git a/ext/pdo/tests/pdo_016a.phpt b/ext/pdo/tests/pdo_016a.phpt index e1239157cbd02..20919d91af925 100644 --- a/ext/pdo/tests/pdo_016a.phpt +++ b/ext/pdo/tests/pdo_016a.phpt @@ -7,7 +7,8 @@ pdo $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; -if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse'); +$dsn = (string) getenv('PDOTEST_DSN'); +if (!strncasecmp($dsn, 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo/tests/pdo_033.phpt b/ext/pdo/tests/pdo_033.phpt index ff129d97179ae..cf5434a7c17f1 100644 --- a/ext/pdo/tests/pdo_033.phpt +++ b/ext/pdo/tests/pdo_033.phpt @@ -6,7 +6,8 @@ pdo diff --git a/ext/pdo/tests/pdo_dsn_containing_credentials.phpt b/ext/pdo/tests/pdo_dsn_containing_credentials.phpt index aac3ca91847b0..2253737dd3014 100644 --- a/ext/pdo/tests/pdo_dsn_containing_credentials.phpt +++ b/ext/pdo/tests/pdo_dsn_containing_credentials.phpt @@ -7,7 +7,8 @@ pdo $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); -$driver = substr(getenv('PDOTEST_DSN'), 0, strpos(getenv('PDOTEST_DSN'), ':')); +$dsn = (string) getenv('PDOTEST_DSN'); +$driver = substr($dsn, 0, strpos($dsn, ':')); if (!in_array($driver, array('mssql','sybase','dblib','firebird','mysql','oci'))) die('skip not supported'); diff --git a/ext/pdo/tests/pdo_test.inc b/ext/pdo/tests/pdo_test.inc index ba9f159228fc2..0f1be9c659d6f 100644 --- a/ext/pdo/tests/pdo_test.inc +++ b/ext/pdo/tests/pdo_test.inc @@ -19,7 +19,7 @@ class PDOTest { // create an instance of the PDO driver, based on // the current environment static function factory($classname = 'PDO', $drop_test_tables = true) { - $dsn = getenv('PDOTEST_DSN'); + $dsn = (string) getenv('PDOTEST_DSN'); $user = getenv('PDOTEST_USER'); $pass = getenv('PDOTEST_PASS'); $attr = getenv('PDOTEST_ATTR'); diff --git a/ext/pdo_dblib/tests/pdo_dblib_quote.phpt b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt index 1855841d4a455..0ca18b3d02ee5 100644 --- a/ext/pdo_dblib/tests/pdo_dblib_quote.phpt +++ b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt @@ -31,7 +31,10 @@ var_dump($db->getAttribute(PDO::ATTR_DEFAULT_STR_PARAM) === PDO::PARAM_STR_NATL) ?> --EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) "'1'" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) "''" string(4) "'42'" diff --git a/ext/pdo_mysql/tests/config.inc b/ext/pdo_mysql/tests/config.inc index 8bcc1ee65968f..ab1d9b7e94045 100644 --- a/ext/pdo_mysql/tests/config.inc +++ b/ext/pdo_mysql/tests/config.inc @@ -4,8 +4,8 @@ if (false !== getenv('PDO_MYSQL_TEST_DSN')) { # user set them from their shell $config['ENV']['PDOTEST_DSN'] = getenv('PDO_MYSQL_TEST_DSN'); - $config['ENV']['PDOTEST_USER'] = getenv('PDO_MYSQL_TEST_USER'); - $config['ENV']['PDOTEST_PASS'] = getenv('PDO_MYSQL_TEST_PASS'); + $config['ENV']['PDOTEST_USER'] = getenv('PDO_MYSQL_TEST_USER') ?: null; + $config['ENV']['PDOTEST_PASS'] = getenv('PDO_MYSQL_TEST_PASS') ?: null; if (false !== getenv('PDO_MYSQL_TEST_ATTR')) { $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_MYSQL_TEST_ATTR'); } diff --git a/ext/reflection/tests/005.phpt b/ext/reflection/tests/005.phpt index 58411f98c847c..99341614d106a 100644 --- a/ext/reflection/tests/005.phpt +++ b/ext/reflection/tests/005.phpt @@ -46,9 +46,13 @@ foreach($r->getMethods() as $m) } ?> ---EXPECT-- +--EXPECTF-- string(19) "Comment for class A" string(15) "Method A::bla()" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(22) "* Comment for A::baz()" diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt index adb3784347374..f6d2c5ad24624 100644 --- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt +++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt @@ -50,6 +50,8 @@ ReflectionClass::__construct() expects exactly 1 argument, 0 given Deprecated: ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in %s on line %d Class "" does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Class "1" does not exist Class "1" does not exist ReflectionClass::__construct(): Argument #1 ($objectOrClass) must be of type object|string, array given diff --git a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt index d143006af9992..d998dfac80c80 100644 --- a/ext/reflection/tests/ReflectionClass_getConstant_error.phpt +++ b/ext/reflection/tests/ReflectionClass_getConstant_error.phpt @@ -12,8 +12,10 @@ var_dump($rc->getConstant(1)); var_dump($rc->getConstant(1.5)); var_dump($rc->getConstant(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index 9278b47875448..47e5fb11def0b 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -63,6 +63,8 @@ Deprecated: ReflectionClass::getMethod(): Passing null to parameter #1 ($name) o Method C::() does not exist Method C::1() does not exist Method C::1.5() does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Method C::1() does not exist ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index c2f8419a1ea7f..0ba737dd32594 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -61,6 +61,8 @@ Deprecated: ReflectionClass::getProperty(): Passing null to parameter #1 ($name) Property C::$ does not exist Property C::$1 does not exist Property C::$1.5 does not exist + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Property C::$1 does not exist ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt index 4e4c206ac23ee..927f29345c093 100644 --- a/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasConstant_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasConstant(1)); var_dump($rc->hasConstant(1.5)); var_dump($rc->hasConstant(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt index 5e175fbb7e5da..dc8c58e8e1464 100644 --- a/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasMethod_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasMethod(1)); var_dump($rc->hasMethod(1.5)); var_dump($rc->hasMethod(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt index 14b4520e07ef0..e752915992a55 100644 --- a/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_hasProperty_002.phpt @@ -15,8 +15,10 @@ var_dump($rc->hasProperty(1)); var_dump($rc->hasProperty(1.5)); var_dump($rc->hasProperty(true)); ?> ---EXPECT-- +--EXPECTF-- Check invalid params: bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt index 8c5bd7139ceaa..cd068ce940856 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt @@ -65,6 +65,8 @@ try { ?> --EXPECTF-- Wrong type of argument (bool): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: ReflectionMethod::__construct(): Argument #1 ($objectOrMethod) must be a valid method name in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('1') @@ -75,11 +77,15 @@ Stack trace: #0 %s ReflectionMethod->__construct('3') #1 {main} Wrong type of argument (bool, string): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: Class "1" does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('1', 'foo') #1 {main} Wrong type of argument (string, bool): + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ReflectionException: Method TestClass::1() does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestClass', '1') diff --git a/ext/reflection/tests/bug64936.phpt b/ext/reflection/tests/bug64936.phpt index 537876d1c60cb..ac523ed2e7d27 100644 --- a/ext/reflection/tests/bug64936.phpt +++ b/ext/reflection/tests/bug64936.phpt @@ -28,6 +28,9 @@ $rb = new ReflectionClass('B'); var_dump(strip_doc_comment($rb->getDocComment())); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/session/tests/010.phpt b/ext/session/tests/010.phpt index 367edcfa61fd4..326f61b8de8c3 100644 --- a/ext/session/tests/010.phpt +++ b/ext/session/tests/010.phpt @@ -14,5 +14,6 @@ error_reporting(E_ALL); $session_array = explode(";", @session_encode()); print "I live\n"; ?> ---EXPECT-- +--EXPECTF-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d I live diff --git a/ext/session/tests/bug79031.phpt b/ext/session/tests/bug79031.phpt index d56f19decf56c..df7019999c892 100644 --- a/ext/session/tests/bug79031.phpt +++ b/ext/session/tests/bug79031.phpt @@ -57,6 +57,8 @@ Warning: session_start(): Session cannot be started after headers have already b Warning: session_encode(): Cannot encode non-existent session in %s on line %d +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_decode(): Session data cannot be decoded when there is no active session in %s on line %d diff --git a/ext/session/tests/session_encode_variation8.phpt b/ext/session/tests/session_encode_variation8.phpt index 3571e8c821691..604d8feac6cba 100644 --- a/ext/session/tests/session_encode_variation8.phpt +++ b/ext/session/tests/session_encode_variation8.phpt @@ -29,6 +29,8 @@ Warning: session_start(): Cannot find session serialization handler "blah" - ses bool(false) Warning: session_encode(): Cannot encode non-existent session in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index e8756ee81a823..eb0e4d97acb3e 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -64,6 +64,8 @@ rmdir($path); *** Testing session_set_save_handler() : basic functionality *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) diff --git a/ext/session/tests/session_set_save_handler_closures.phpt b/ext/session/tests/session_set_save_handler_closures.phpt index 4f8b21f20d1c7..65616997b035f 100644 --- a/ext/session/tests/session_set_save_handler_closures.phpt +++ b/ext/session/tests/session_set_save_handler_closures.phpt @@ -55,6 +55,8 @@ ob_end_flush(); *** Testing session_set_save_handler() : using closures as callbacks *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) diff --git a/ext/session/tests/session_set_save_handler_variation1.phpt b/ext/session/tests/session_set_save_handler_variation1.phpt index cf30ba7f1e10f..ff632d9449012 100644 --- a/ext/session/tests/session_set_save_handler_variation1.phpt +++ b/ext/session/tests/session_set_save_handler_variation1.phpt @@ -25,6 +25,8 @@ ob_end_flush(); *** Testing session_set_save_handler() : variation *** string(%d) "%s" +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: session_module_name(): Session handler module "" cannot be found in %s on line %d bool(false) string(%d) "%s" diff --git a/ext/sockets/tests/socket_export_stream-1.phpt b/ext/sockets/tests/socket_export_stream-1.phpt index b2a01ddcca10d..f750a3d0cc775 100644 --- a/ext/sockets/tests/socket_export_stream-1.phpt +++ b/ext/sockets/tests/socket_export_stream-1.phpt @@ -5,7 +5,7 @@ sockets --FILE-- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- File modification time is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- inode change time is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- File '' -- -- File access time is => diff --git a/ext/standard/tests/file/file_exists_variation1.phpt b/ext/standard/tests/file/file_exists_variation1.phpt index 446e7fac16a06..73a11345cdc7f 100644 --- a/ext/standard/tests/file/file_exists_variation1.phpt +++ b/ext/standard/tests/file/file_exists_variation1.phpt @@ -12,8 +12,10 @@ var_dump(file_exists(' ')); var_dump(file_exists('|')); echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing file_exists() : usage variations *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/file_get_contents_variation8.phpt b/ext/standard/tests/file/file_get_contents_variation8.phpt index ad23a13bb6b79..5b9f7a401db1f 100644 --- a/ext/standard/tests/file/file_get_contents_variation8.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8.phpt @@ -49,9 +49,13 @@ Warning: file_get_contents(-1): Failed to open stream: No such file or directory bool(false) -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: file_get_contents(1): Failed to open stream: No such file or directory in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Iteration 3 -- ValueError: Path cannot be empty diff --git a/ext/standard/tests/file/file_put_contents_variation8.phpt b/ext/standard/tests/file/file_put_contents_variation8.phpt index 70456fad9ff7d..de60775a7f0bf 100644 --- a/ext/standard/tests/file/file_put_contents_variation8.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8.phpt @@ -57,8 +57,14 @@ echo "\n*** Done ***\n"; -- Iteration 0 -- 9 bytes written to: '-1' -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d 9 bytes written to: '1' + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Iteration 3 -- ValueError: Path cannot be empty diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index 7d0a87d247244..d7e4127e7f48d 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -45,8 +45,12 @@ Warning: filegroup(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: filegroup(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: filegroup(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt index 2dace6413c3e6..6ee52e722e439 100644 --- a/ext/standard/tests/file/fileinode_variation2.phpt +++ b/ext/standard/tests/file/fileinode_variation2.phpt @@ -45,8 +45,12 @@ Warning: fileinode(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileinode(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileinode(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt index 05cc8495b1345..abddb319a9951 100644 --- a/ext/standard/tests/file/fileowner_variation2.phpt +++ b/ext/standard/tests/file/fileowner_variation2.phpt @@ -46,8 +46,12 @@ Warning: fileowner(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileowner(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileowner(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt index c46ce617ae72d..a2a5e4e7ebe85 100644 --- a/ext/standard/tests/file/fileperms_variation2.phpt +++ b/ext/standard/tests/file/fileperms_variation2.phpt @@ -45,8 +45,12 @@ Warning: fileperms(): stat failed for in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: fileperms(): stat failed for 1 in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) Warning: fileperms(): stat failed for 1234 in %s on line %d diff --git a/ext/standard/tests/file/filesize_variation5.phpt b/ext/standard/tests/file/filesize_variation5.phpt index 7da6e73e06139..cd67e2a667e2d 100644 --- a/ext/standard/tests/file/filesize_variation5.phpt +++ b/ext/standard/tests/file/filesize_variation5.phpt @@ -15,6 +15,8 @@ echo "*** Done ***\n"; ?> --EXPECTF-- *** Testing filesize(): usage variations *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/fnmatch_basic.phpt b/ext/standard/tests/file/fnmatch_basic.phpt index 8b74bb430b371..b412c8a44cf94 100644 --- a/ext/standard/tests/file/fnmatch_basic.phpt +++ b/ext/standard/tests/file/fnmatch_basic.phpt @@ -26,7 +26,7 @@ var_dump( fnmatch(FALSE, FALSE) ); echo "\n*** Done ***\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing fnmatch() with file *** bool(true) bool(true) @@ -37,7 +37,15 @@ bool(false) *** Testing fnmatch() with other than file *** bool(true) bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) *** Done *** diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index 3413c3e6f76c6..a05f6e60c7bfe 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -136,7 +136,7 @@ match_($null_arr, $null_arr); echo "\n*** Done ***\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing fnmatch() with file and various patterns *** -- Iteration 0 -- bool(true) @@ -304,91 +304,235 @@ bool(true) --- With booleans --- -- Iteration 0 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) bool(true) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) bool(false) -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) bool(false) -- Iteration 4 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(true) bool(false) bool(false) -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) bool(false) bool(true) bool(false) -- Iteration 8 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index a16c97a745aeb..8c39ed3cba241 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -25,7 +25,7 @@ function check_read($file_handle, $read_size, $expect_size) { $data_from_file = fread($file_handle, $read_size); // check if data read is of expected size - if ( strlen($data_from_file) == $expect_size) + if ($data_from_file === false || strlen($data_from_file) == $expect_size) echo "OK\n"; else echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n"; diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index 97c6c39f9c8cf..407172d6a33b2 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -23,7 +23,7 @@ function check_read($file_handle, $read_size, $expect_size) { $data_from_file = fread($file_handle, $read_size); // check if data read is of expected size - if ( strlen($data_from_file) == $expect_size) + if ($data_from_file === false || strlen($data_from_file) == $expect_size) echo "OK\n"; else echo "Error reading file, total number of bytes read = ".strlen($data_from_file)."\n"; @@ -502,12 +502,12 @@ OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(%r1024|1137%r) +int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d OK -int(%r1024|1137%r) +int(1024) bool(false) -- File opened in mode x -- -- Reading beyond filesize, expected : 1024 bytes -- @@ -553,11 +553,11 @@ OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(%r1024|1137%r) +int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d OK -int(%r1024|1137%r) +int(1024) bool(false) Done diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 4fc1c240b4d40..794978be6d99e 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -383,18 +383,30 @@ array(0) { } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(1) { [0]=> string(%d) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } @@ -448,6 +460,8 @@ array(1) { string(%d) "%s/glob_variation/wonder1" } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } Done diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index 730a2bcfea4d3..7e122b2cfafbb 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -24,10 +24,14 @@ foreach($dirnames as $dirname) { var_dump( is_dir($dirname) ); } ?> ---EXPECT-- +--EXPECTF-- *** Testing is_dir() with Invalid arguments: expected bool(false) *** bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index b9b3a98e5c626..9e426ec8f6d7d 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -34,14 +34,18 @@ foreach( $invalid_files as $invalid_file ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing is_executable(): usage variations *** *** Testing is_executable() on invalid files *** bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) Done diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index e4a5766762824..3c510b0ebdcc1 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -28,14 +28,18 @@ foreach( $misc_files as $misc_file ) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing is_readable(): usage variations *** *** Testing is_readable() on miscellaneous filenames *** bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) Done diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 021d6e5645414..f55bc782a19cf 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -29,7 +29,7 @@ foreach( $misc_files as $misc_file ) { clearstatcache(); } ?> ---EXPECT-- +--EXPECTF-- *** Testing is_writable(): usage variations *** *** Testing is_writable() with invalid filenames *** @@ -39,9 +39,17 @@ bool(false) bool(false) bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) bool(false) diff --git a/ext/standard/tests/file/lstat_stat_variation22.phpt b/ext/standard/tests/file/lstat_stat_variation22.phpt index 9efb23fc4178b..c16225b00ab37 100644 --- a/ext/standard/tests/file/lstat_stat_variation22.phpt +++ b/ext/standard/tests/file/lstat_stat_variation22.phpt @@ -26,6 +26,8 @@ var_dump(lstat('|')); ?> --EXPECTF-- *** testing stat *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) @@ -35,6 +37,8 @@ bool(false) Warning: stat(): stat failed for | in %s on line %d bool(false) *** testing lstat *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/pathinfo_variaton.phpt b/ext/standard/tests/file/pathinfo_variaton.phpt index 04e1f15c6935a..c9bea7c58c584 100644 --- a/ext/standard/tests/file/pathinfo_variaton.phpt +++ b/ext/standard/tests/file/pathinfo_variaton.phpt @@ -73,7 +73,7 @@ foreach($paths as $path) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing pathinfo() with miscellaneous input arguments *** -- Iteration 1 -- array(3) { @@ -130,6 +130,8 @@ string(6) "2.3456" string(4) "3456" string(1) "2" -- Iteration 5 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(3) { ["dirname"]=> string(1) "." @@ -138,20 +140,38 @@ array(3) { ["filename"]=> string(1) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "." + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(2) { ["basename"]=> string(0) "" ["filename"]=> string(0) "" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 7 -- array(3) { diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt index 9e47e68fac3c9..b43efd708db6b 100644 --- a/ext/standard/tests/file/readfile_error.phpt +++ b/ext/standard/tests/file/readfile_error.phpt @@ -30,6 +30,8 @@ echo "Done\n"; -- Testing readfile() with invalid arguments -- Path cannot be empty + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Path cannot be empty -- Testing readfile() with non-existent file -- diff --git a/ext/standard/tests/file/readfile_variation10.phpt b/ext/standard/tests/file/readfile_variation10.phpt index 5afc5622ed166..2568c23b7f95c 100644 --- a/ext/standard/tests/file/readfile_variation10.phpt +++ b/ext/standard/tests/file/readfile_variation10.phpt @@ -47,8 +47,12 @@ for( $i=0; $i %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s/%s File permissions are => 100600 File created in => directory specified -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s/%s File permissions are => 100600 File created in => directory specified diff --git a/ext/standard/tests/file/tempnam_variation7.phpt b/ext/standard/tests/file/tempnam_variation7.phpt index 1928da4f89624..d4bc661981483 100644 --- a/ext/standard/tests/file/tempnam_variation7.phpt +++ b/ext/standard/tests/file/tempnam_variation7.phpt @@ -77,11 +77,15 @@ File permissions are => 100600 File created in => temp dir -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7.php on line %d File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s%etempnam_variation3.tmp%s File permissions are => 100600 File created in => temp dir diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt index 1dd8ef1a25c9e..ec6141311658e 100644 --- a/ext/standard/tests/file/unlink_error.phpt +++ b/ext/standard/tests/file/unlink_error.phpt @@ -55,8 +55,12 @@ Warning: unlink(): %s in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: unlink(): %s in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Testing unlink() on non-existent file -- diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt index 028b987eece2a..56b3318cca0af 100644 --- a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt +++ b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt @@ -54,7 +54,7 @@ foreach($inputs as $input) { $iterator++; }; ?> ---EXPECT-- +--EXPECTF-- *** Testing escapeshellarg() : usage variations *** -- Iteration 1 -- @@ -88,15 +88,23 @@ string(12) "'0.01234567'" string(5) "'0.5'" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) "'1'" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) "''" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) "'1'" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) "''" -- Iteration 15 -- diff --git a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt index 195affe4fc685..cf44977ac5c64 100644 --- a/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt +++ b/ext/standard/tests/general_functions/get_cfg_var_variation2.phpt @@ -27,9 +27,17 @@ foreach ( $variation_array as $var ) { var_dump(get_cfg_var( $var ) ); } ?> ---EXPECT-- +--EXPECTF-- *** Test substituting argument 1 with boolean values *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) diff --git a/ext/standard/tests/general_functions/uniqid_basic.phpt b/ext/standard/tests/general_functions/uniqid_basic.phpt index 408f72bfdbaa3..5ee033591be9c 100644 --- a/ext/standard/tests/general_functions/uniqid_basic.phpt +++ b/ext/standard/tests/general_functions/uniqid_basic.phpt @@ -51,10 +51,22 @@ string(17) "1050%s" string(27) "1050%s.%s" string(17) "1050%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(14) "1%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(24) "1%s.%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(14) "1%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(13) "%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(23) "%s.%s" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(13) "%s" diff --git a/ext/standard/tests/math/base_convert_variation1.phpt b/ext/standard/tests/math/base_convert_variation1.phpt index fd06465ab574b..23f16fc14423d 100644 --- a/ext/standard/tests/math/base_convert_variation1.phpt +++ b/ext/standard/tests/math/base_convert_variation1.phpt @@ -107,15 +107,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been string(1) "5" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "0" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "0" -- Iteration 15 -- diff --git a/ext/standard/tests/math/bindec_basic.phpt b/ext/standard/tests/math/bindec_basic.phpt index 7640171fe61b6..2321b6285ae6c 100644 --- a/ext/standard/tests/math/bindec_basic.phpt +++ b/ext/standard/tests/math/bindec_basic.phpt @@ -72,5 +72,9 @@ int(6) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/bindec_basic_64bit.phpt b/ext/standard/tests/math/bindec_basic_64bit.phpt index 8fece221c0ede..0205966736f1d 100644 --- a/ext/standard/tests/math/bindec_basic_64bit.phpt +++ b/ext/standard/tests/math/bindec_basic_64bit.phpt @@ -72,5 +72,9 @@ int(6) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/bindec_variation1.phpt b/ext/standard/tests/math/bindec_variation1.phpt index 420ceeed7a6a8..3ee08d70b7d32 100644 --- a/ext/standard/tests/math/bindec_variation1.phpt +++ b/ext/standard/tests/math/bindec_variation1.phpt @@ -109,15 +109,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(0) -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- diff --git a/ext/standard/tests/math/bindec_variation1_64bit.phpt b/ext/standard/tests/math/bindec_variation1_64bit.phpt index 56bbbd35649b5..76d53aae51836 100644 --- a/ext/standard/tests/math/bindec_variation1_64bit.phpt +++ b/ext/standard/tests/math/bindec_variation1_64bit.phpt @@ -109,15 +109,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(0) -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- diff --git a/ext/standard/tests/math/hexdec_basic.phpt b/ext/standard/tests/math/hexdec_basic.phpt index 2f06b9650aed3..51e0f4f0315f5 100644 --- a/ext/standard/tests/math/hexdec_basic.phpt +++ b/ext/standard/tests/math/hexdec_basic.phpt @@ -49,5 +49,9 @@ int(3215379) int(51446064) int(18279) int(70199) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/hexdec_basic_64bit.phpt b/ext/standard/tests/math/hexdec_basic_64bit.phpt index fd6d53b601982..a04a22bdd96cb 100644 --- a/ext/standard/tests/math/hexdec_basic_64bit.phpt +++ b/ext/standard/tests/math/hexdec_basic_64bit.phpt @@ -86,7 +86,11 @@ int(18279) int(70199) -- hexdec 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- hexdec -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/hexdec_variation1.phpt b/ext/standard/tests/math/hexdec_variation1.phpt index 65ebbe347b9b6..c2d5ed16c76ad 100644 --- a/ext/standard/tests/math/hexdec_variation1.phpt +++ b/ext/standard/tests/math/hexdec_variation1.phpt @@ -115,15 +115,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(5) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 16 -- diff --git a/ext/standard/tests/math/hexdec_variation1_64bit.phpt b/ext/standard/tests/math/hexdec_variation1_64bit.phpt index c892b8049fc9a..1d991277c6a96 100644 --- a/ext/standard/tests/math/hexdec_variation1_64bit.phpt +++ b/ext/standard/tests/math/hexdec_variation1_64bit.phpt @@ -115,15 +115,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(5) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 16 -- diff --git a/ext/standard/tests/math/octdec_basic.phpt b/ext/standard/tests/math/octdec_basic.phpt index 4c3ffc8b8a91b..83498ab29fcf3 100644 --- a/ext/standard/tests/math/octdec_basic.phpt +++ b/ext/standard/tests/math/octdec_basic.phpt @@ -55,5 +55,9 @@ int(5349) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(102923) int(823384) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/octdec_basic_64bit.phpt b/ext/standard/tests/math/octdec_basic_64bit.phpt index 4051d9be63230..7272ec557bd72 100644 --- a/ext/standard/tests/math/octdec_basic_64bit.phpt +++ b/ext/standard/tests/math/octdec_basic_64bit.phpt @@ -60,5 +60,9 @@ int(5349) Deprecated: Invalid characters passed for attempted conversion, these have been ignored in %s on line %d int(102923) int(823384) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) diff --git a/ext/standard/tests/math/octdec_variation1.phpt b/ext/standard/tests/math/octdec_variation1.phpt index c24d2e8e6beae..22930a7d80fc0 100644 --- a/ext/standard/tests/math/octdec_variation1.phpt +++ b/ext/standard/tests/math/octdec_variation1.phpt @@ -118,15 +118,23 @@ Deprecated: Invalid characters passed for attempted conversion, these have been int(5) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) -- Iteration 16 -- diff --git a/ext/standard/tests/network/inet_ipv6.phpt b/ext/standard/tests/network/inet_ipv6.phpt index 8e9c44431b9b5..af48246a95719 100644 --- a/ext/standard/tests/network/inet_ipv6.phpt +++ b/ext/standard/tests/network/inet_ipv6.phpt @@ -33,12 +33,14 @@ foreach ($a as $address) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- string(3) "::1" string(3) "::2" string(4) "::35" string(5) "::255" string(6) "::1024" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) string(36) "2001:db8:85a3:8d3:1319:8a2e:370:7344" string(15) "2001:db8:1234::" diff --git a/ext/standard/tests/streams/stream_socket_pair.phpt b/ext/standard/tests/streams/stream_socket_pair.phpt index b926c9d9f4387..9364caf6f89b5 100644 --- a/ext/standard/tests/streams/stream_socket_pair.phpt +++ b/ext/standard/tests/streams/stream_socket_pair.phpt @@ -2,7 +2,7 @@ stream_socket_pair() --FILE-- ---EXPECT-- +--EXPECTF-- *** Testing chop() : with miscellaneous arguments *** string(9) "chop test" string(12) "chop test " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "chop test " string(9) "chop test" string(10) "chop test " diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt index 7092efe94248b..f626f7cde3fba 100644 --- a/ext/standard/tests/strings/implode1.phpt +++ b/ext/standard/tests/strings/implode1.phpt @@ -219,8 +219,12 @@ array(6) { -- Iteration 1 -- string(59) "2TRUE0TRUE-639TRUE1TRUEPHPTRUETRUETRUE TRUEstring%0with%0...%0" -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(35) "2101-639111PHP111 1string%0with%0...%0" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(27) "20-6391PHP string%0with%0...%0" -- Iteration 4 -- implode(): Argument #1 ($separator) must be of type string, array given diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt index 256f361460b24..be10d7bb100bc 100644 --- a/ext/standard/tests/strings/join_variation1.phpt +++ b/ext/standard/tests/strings/join_variation1.phpt @@ -82,7 +82,7 @@ for($index = 0; $index < count($values); $index ++) { echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing join() : usage variations *** --- Testing join() by supplying different values for 'glue' argument --- @@ -115,12 +115,20 @@ join(): Argument #1 ($separator) must be of type string, array given -- Iteration 14 -- join(): Argument #1 ($separator) must be of type string, array given -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "element11element2" -- Iteration 16 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "element1element2" -- Iteration 17 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(17) "element11element2" -- Iteration 18 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "element1element2" -- Iteration 19 -- string(26) "element1testObjectelement2" diff --git a/ext/standard/tests/strings/join_variation4.phpt b/ext/standard/tests/strings/join_variation4.phpt index 21774b4bca2e2..55a978eb00e6c 100644 --- a/ext/standard/tests/strings/join_variation4.phpt +++ b/ext/standard/tests/strings/join_variation4.phpt @@ -53,8 +53,12 @@ echo "Done\n"; -- Iteration 1 -- string(87) "2TRUE0TRUE-639TRUE-1.3444TRUE1TRUEPHPTRUETRUETRUE TRUE6999.99999999TRUEstring%0with%0...%0" -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(57) "2101-6391-1.3444111PHP111 16999.999999991string%0with%0...%0" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(47) "20-639-1.34441PHP 6999.99999999string%0with%0...%0" -- Iteration 4 -- join(): Argument #1 ($separator) must be of type string, array given diff --git a/ext/standard/tests/strings/lcfirst.phpt b/ext/standard/tests/strings/lcfirst.phpt index d98b3a9cb0eed..d0b8874e67b12 100644 --- a/ext/standard/tests/strings/lcfirst.phpt +++ b/ext/standard/tests/strings/lcfirst.phpt @@ -147,11 +147,15 @@ string(6) "-3.344" string(4) "nULL" string(1) "0" string(1) "0" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" string(4) "tRUE" string(1) "1" string(1) "1" string(8) "1.234444" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(5) "fALSE" string(1) " " diff --git a/ext/standard/tests/strings/ltrim.phpt b/ext/standard/tests/strings/ltrim.phpt index 952ad282c6fe7..bb236f4d0729c 100644 --- a/ext/standard/tests/strings/ltrim.phpt +++ b/ext/standard/tests/strings/ltrim.phpt @@ -37,7 +37,7 @@ var_dump( ltrim( 12345 ) ); /* Scalar argume echo "\nDone\n"; ?> ---EXPECT-- +--EXPECTF-- *** Output for Error Conditions *** *** Using heredoc string *** @@ -46,6 +46,8 @@ string(17) "ng heredoc string" *** Output for Normal Behaviour *** string(10) "ltrim test" string(13) " ltrim test" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(18) " ltrim test" string(10) "ltrim test" string(11) " ltrim test" diff --git a/ext/standard/tests/strings/quoted_printable_encode_001.phpt b/ext/standard/tests/strings/quoted_printable_encode_001.phpt index a1e0ec1338aa2..609bdfdd082b5 100644 --- a/ext/standard/tests/strings/quoted_printable_encode_001.phpt +++ b/ext/standard/tests/strings/quoted_printable_encode_001.phpt @@ -11,9 +11,11 @@ var_dump(quoted_printable_encode(false)); echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- string(0) "" string(4) "test" string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" Done diff --git a/ext/standard/tests/strings/rtrim.phpt b/ext/standard/tests/strings/rtrim.phpt index 21e91c1ac361c..06a05c6057e2f 100644 --- a/ext/standard/tests/strings/rtrim.phpt +++ b/ext/standard/tests/strings/rtrim.phpt @@ -45,6 +45,8 @@ echo "Done\n"; *** Output for Normal Behaviour *** string(10) "rtrim test" string(13) "rtrim test " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(18) "rtrim test " string(10) "rtrim test" string(11) "rtrim test " diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt index 6b9430e38666f..a09130e480c76 100644 --- a/ext/standard/tests/strings/sprintf_variation1.phpt +++ b/ext/standard/tests/strings/sprintf_variation1.phpt @@ -98,7 +98,7 @@ fclose($file_handle); echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing sprintf() : with unexpected values for format argument *** -- Iteration 1 -- @@ -172,23 +172,47 @@ sprintf(): Argument #1 ($format) must be of type string, array given sprintf(): Argument #1 ($format) must be of type string, array given -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 16 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 17 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 18 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 19 -- diff --git a/ext/standard/tests/strings/str_pad.phpt b/ext/standard/tests/strings/str_pad.phpt index 278db455f8d55..6f46e94333317 100644 --- a/ext/standard/tests/strings/str_pad.phpt +++ b/ext/standard/tests/strings/str_pad.phpt @@ -79,7 +79,7 @@ try { } ?> ---EXPECT-- +--EXPECTF-- #### Basic operations #### string(20) "str_pad() " string(20) "str_pad()-+-+-+-+-+-" @@ -148,35 +148,95 @@ string(16) "================" string(16) "================" string(16) "================" string(16) "================" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "========1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "1========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(9) "====1====" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1=========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "=========1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "1=========" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "====1=====" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1 " + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1===============" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "===============1" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1===============" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "=======1========" string(2) "15" string(2) "15" @@ -278,9 +338,17 @@ string(16) "variation1111111" string(16) "1111111variation" string(16) "variation1111111" string(16) "111variation1111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "variation1111111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "1111111variation" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "variation1111111" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(16) "111variation1111" string(16) "variationstring_" string(16) "string_variation" diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt index 3351e7f871336..17e3655b434ac 100644 --- a/ext/standard/tests/strings/str_repeat.phpt +++ b/ext/standard/tests/strings/str_repeat.phpt @@ -70,9 +70,17 @@ try { --- str_repeat() of '1' --- -- after repeating 0 times is => --- after repeating 1 times is => 1 --- after repeating 2 times is => 11 --- after repeating 3 times is => 111 +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +-- after repeating 1 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +1 +-- after repeating 2 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +11 +-- after repeating 3 times is => +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d +111 --- str_repeat() of '4' --- -- after repeating 0 times is => diff --git a/ext/standard/tests/strings/str_replace_variation1.phpt b/ext/standard/tests/strings/str_replace_variation1.phpt index 00ed1a8babe35..5facbf514daef 100644 --- a/ext/standard/tests/strings/str_replace_variation1.phpt +++ b/ext/standard/tests/strings/str_replace_variation1.phpt @@ -23,6 +23,8 @@ foreach( $search_arr as $value ) { *** Testing str_replace() with various search values *** -- Iteration 0 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: Array to string conversion in %s on line %d array(12) { [0]=> @@ -54,6 +56,8 @@ int(5) -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: Array to string conversion in %s on line %d array(12) { [0]=> diff --git a/ext/standard/tests/strings/str_replace_variation2.phpt b/ext/standard/tests/strings/str_replace_variation2.phpt index 957c990555ea5..e61b585f337c5 100644 --- a/ext/standard/tests/strings/str_replace_variation2.phpt +++ b/ext/standard/tests/strings/str_replace_variation2.phpt @@ -212,6 +212,8 @@ string(198) "Hello, world,0120333FOUND445-1.234567 NULL TRUE FALSE%0 --- Iteration 21 --- -- String after replacing the search value is => -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(207) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(FOUND28).chr(234).chr(65).chr(255).chr(256)" @@ -240,6 +242,8 @@ string(207) "Hello, world,0FOUND20333.3445-FOUND.234567 NULL TRUE FALSE --- Iteration 25 --- -- String after replacing the search value is => -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(195) "Hello, world,0120333.3445-1.234567 NULL TRUE FALSE%0 %00ZCD%0abcd \xXYZ abcd $$@#%^&*!~,.:;?: !!Hello, World ?Hello, World chr(0).chr(128).chr(234).chr(65).chr(255).chr(256)" diff --git a/ext/standard/tests/strings/strcasecmp.phpt b/ext/standard/tests/strings/strcasecmp.phpt index 04452067d488f..4c27873b8892f 100644 --- a/ext/standard/tests/strings/strcasecmp.phpt +++ b/ext/standard/tests/strings/strcasecmp.phpt @@ -23,8 +23,9 @@ foreach($arrays as $str1_arr){ for ($i=0; $i "; - var_dump(strcasecmp($str1_arr[$i], $str1_arr[$j])); + var_dump($result); } } } @@ -119,44 +120,44 @@ Array ( [0] => a [1] => A - [2] => - [3] => + [2] => %s + [3] => %s [4] => %0 ) Iteration 0 - strcasecmp of 'a' and 'a' is => int(0) - strcasecmp of 'a' and 'A' is => int(0) -- strcasecmp of 'a' and '' is => int(-%d) -- strcasecmp of 'a' and '' is => int(-%d) +- strcasecmp of 'a' and '%s' is => int(-%d) +- strcasecmp of 'a' and '%s' is => int(-%d) - strcasecmp of 'a' and '%0' is => int(%d) Iteration 1 - strcasecmp of 'A' and 'a' is => int(0) - strcasecmp of 'A' and 'A' is => int(0) -- strcasecmp of 'A' and '' is => int(-%d) -- strcasecmp of 'A' and '' is => int(-%d) +- strcasecmp of 'A' and '%s' is => int(-%d) +- strcasecmp of 'A' and '%s' is => int(-%d) - strcasecmp of 'A' and '%0' is => int(%d) Iteration 2 -- strcasecmp of '' and 'a' is => int(%d) -- strcasecmp of '' and 'A' is => int(%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '' is => int(-%d) -- strcasecmp of '' and '%0' is => int(%d) +- strcasecmp of '%s' and 'a' is => int(%d) +- strcasecmp of '%s' and 'A' is => int(%d) +- strcasecmp of '%s' and '%s' is => int(0) +- strcasecmp of '%s' and '%s' is => int(-%d) +- strcasecmp of '%s' and '%0' is => int(%d) Iteration 3 -- strcasecmp of '' and 'a' is => int(%d) -- strcasecmp of '' and 'A' is => int(%d) -- strcasecmp of '' and '' is => int(%d) -- strcasecmp of '' and '' is => int(0) -- strcasecmp of '' and '%0' is => int(%d) +- strcasecmp of '%s' and 'a' is => int(%d) +- strcasecmp of '%s' and 'A' is => int(%d) +- strcasecmp of '%s' and '%s' is => int(%d) +- strcasecmp of '%s' and '%s' is => int(0) +- strcasecmp of '%s' and '%0' is => int(%d) Iteration 4 - strcasecmp of '%0' and 'a' is => int(-%d) - strcasecmp of '%0' and 'A' is => int(-%d) -- strcasecmp of '%0' and '' is => int(-%d) -- strcasecmp of '%0' and '' is => int(-%d) +- strcasecmp of '%0' and '%s' is => int(-%d) +- strcasecmp of '%0' and '%s' is => int(-%d) - strcasecmp of '%0' and '%0' is => int(0) *** comparing the strings in an @@ -294,8 +295,14 @@ Iteration 0 - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '-1' is => int(%d) - strcasecmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '' is => int(%d) - strcasecmp of '1' and 'string' is => int(-%d) @@ -306,8 +313,14 @@ Iteration 1 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '' is => int(%d) - strcasecmp of '0' and 'string' is => int(-%d) @@ -318,8 +331,14 @@ Iteration 2 - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '-1' is => int(%d) - strcasecmp of '0' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '0' and '' is => int(%d) - strcasecmp of '0' and 'string' is => int(-%d) @@ -330,8 +349,14 @@ Iteration 3 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '' is => int(%d) - strcasecmp of '-1' and 'string' is => int(-%d) @@ -342,8 +367,14 @@ Iteration 4 - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '-1' is => int(0) - strcasecmp of '-1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '-1' and '' is => int(%d) - strcasecmp of '-1' and 'string' is => int(-%d) @@ -354,45 +385,129 @@ Iteration 5 - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '-1' is => int(-%d) - strcasecmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '' is => int(0) - strcasecmp of '' and 'string' is => int(-%d) Iteration 6 + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and 'string' is => int(-%d) Iteration 7 + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '1' and 'string' is => int(-%d) Iteration 8 + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '0' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '0' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '-1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '-1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of '' and 'string' is => int(-%d) Iteration 9 @@ -402,8 +517,14 @@ Iteration 9 - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '-1' is => int(%d) - strcasecmp of 'string' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of 'string' and '1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of 'string' and '1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcasecmp of 'string' and '' is => int(%d) - strcasecmp of 'string' and 'string' is => int(0) diff --git a/ext/standard/tests/strings/strcmp.phpt b/ext/standard/tests/strings/strcmp.phpt index a36873830cedd..68f0ce7c50be9 100644 --- a/ext/standard/tests/strings/strcmp.phpt +++ b/ext/standard/tests/strings/strcmp.phpt @@ -23,8 +23,9 @@ foreach($arrays as $str1_arr){ for ($i=0; $i "; - var_dump(strcmp($str1_arr[$i], $str1_arr[$j])); + var_dump($result); } } } @@ -121,8 +122,8 @@ Array [1] => A [2] => a [3] => A - [4] => - [5] => + [4] => %s + [5] => %s [6] => %0 ) @@ -131,8 +132,8 @@ Iteration 0 - strcmp of 'a' and 'A' is => int(%d) - strcmp of 'a' and 'a' is => int(0) - strcmp of 'a' and 'A' is => int(%d) -- strcmp of 'a' and '' is => int(-%d) -- strcmp of 'a' and '' is => int(-%d) +- strcmp of 'a' and '%s' is => int(-%d) +- strcmp of 'a' and '%s' is => int(-%d) - strcmp of 'a' and '%0' is => int(%d) Iteration 1 @@ -140,8 +141,8 @@ Iteration 1 - strcmp of 'A' and 'A' is => int(0) - strcmp of 'A' and 'a' is => int(-%d) - strcmp of 'A' and 'A' is => int(0) -- strcmp of 'A' and '' is => int(-%d) -- strcmp of 'A' and '' is => int(-%d) +- strcmp of 'A' and '%s' is => int(-%d) +- strcmp of 'A' and '%s' is => int(-%d) - strcmp of 'A' and '%0' is => int(%d) Iteration 2 @@ -149,8 +150,8 @@ Iteration 2 - strcmp of 'a' and 'A' is => int(%d) - strcmp of 'a' and 'a' is => int(0) - strcmp of 'a' and 'A' is => int(%d) -- strcmp of 'a' and '' is => int(-%d) -- strcmp of 'a' and '' is => int(-%d) +- strcmp of 'a' and '%s' is => int(-%d) +- strcmp of 'a' and '%s' is => int(-%d) - strcmp of 'a' and '%0' is => int(%d) Iteration 3 @@ -158,35 +159,35 @@ Iteration 3 - strcmp of 'A' and 'A' is => int(0) - strcmp of 'A' and 'a' is => int(-%d) - strcmp of 'A' and 'A' is => int(0) -- strcmp of 'A' and '' is => int(-%d) -- strcmp of 'A' and '' is => int(-%d) +- strcmp of 'A' and '%s' is => int(-%d) +- strcmp of 'A' and '%s' is => int(-%d) - strcmp of 'A' and '%0' is => int(%d) Iteration 4 -- strcmp of '' and 'a' is => int(%d) -- strcmp of '' and 'A' is => int(%d) -- strcmp of '' and 'a' is => int(%d) -- strcmp of '' and 'A' is => int(%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and '' is => int(-%d) -- strcmp of '' and '%0' is => int(%d) +- strcmp of '%s' and 'a' is => int(%d) +- strcmp of '%s' and 'A' is => int(%d) +- strcmp of '%s' and 'a' is => int(%d) +- strcmp of '%s' and 'A' is => int(%d) +- strcmp of '%s' and '%s' is => int(0) +- strcmp of '%s' and '%s' is => int(-%d) +- strcmp of '%s' and '%0' is => int(%d) Iteration 5 -- strcmp of '' and 'a' is => int(%d) -- strcmp of '' and 'A' is => int(%d) -- strcmp of '' and 'a' is => int(%d) -- strcmp of '' and 'A' is => int(%d) -- strcmp of '' and '' is => int(%d) -- strcmp of '' and '' is => int(0) -- strcmp of '' and '%0' is => int(%d) +- strcmp of '%s' and 'a' is => int(%d) +- strcmp of '%s' and 'A' is => int(%d) +- strcmp of '%s' and 'a' is => int(%d) +- strcmp of '%s' and 'A' is => int(%d) +- strcmp of '%s' and '%s' is => int(%d) +- strcmp of '%s' and '%s' is => int(0) +- strcmp of '%s' and '%0' is => int(%d) Iteration 6 - strcmp of '%0' and 'a' is => int(-%d) - strcmp of '%0' and 'A' is => int(-%d) - strcmp of '%0' and 'a' is => int(-%d) - strcmp of '%0' and 'A' is => int(-%d) -- strcmp of '%0' and '' is => int(-%d) -- strcmp of '%0' and '' is => int(-%d) +- strcmp of '%0' and '%s' is => int(-%d) +- strcmp of '%0' and '%s' is => int(-%d) - strcmp of '%0' and '%0' is => int(0) *** comparing the strings in an @@ -323,7 +324,11 @@ Iteration 0 - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '-1' is => int(%d) - strcmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '' is => int(%d) - strcmp of '1' and 'string' is => int(-%d) @@ -334,7 +339,11 @@ Iteration 1 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '0' and '' is => int(%d) - strcmp of '0' and 'string' is => int(-%d) @@ -345,7 +354,11 @@ Iteration 2 - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '-1' is => int(%d) - strcmp of '0' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '0' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '0' and '' is => int(%d) - strcmp of '0' and 'string' is => int(-%d) @@ -356,7 +369,11 @@ Iteration 3 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '-1' and '' is => int(%d) - strcmp of '-1' and 'string' is => int(-%d) @@ -367,7 +384,11 @@ Iteration 4 - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '-1' is => int(0) - strcmp of '-1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '-1' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '-1' and '' is => int(%d) - strcmp of '-1' and 'string' is => int(-%d) @@ -378,30 +399,78 @@ Iteration 5 - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '-1' is => int(-%d) - strcmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '' is => int(0) - strcmp of '' and 'string' is => int(-%d) Iteration 6 + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '0' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '-1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '1' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '1' and 'string' is => int(-%d) Iteration 7 + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '0' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '0' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '-1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '-1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '1' is => int(-%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and '' is => int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of '' and 'string' is => int(-%d) Iteration 8 @@ -411,7 +480,11 @@ Iteration 8 - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '-1' is => int(%d) - strcmp of 'string' and '' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of 'string' and '1' is => int(%d) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d - strcmp of 'string' and '' is => int(%d) - strcmp of 'string' and 'string' is => int(0) diff --git a/ext/standard/tests/strings/strip_tags_variation2.phpt b/ext/standard/tests/strings/strip_tags_variation2.phpt index 421f8a62ae4ea..69ac6285b7787 100644 --- a/ext/standard/tests/strings/strip_tags_variation2.phpt +++ b/ext/standard/tests/strings/strip_tags_variation2.phpt @@ -82,7 +82,7 @@ foreach($values as $value) { echo "Done"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strip_tags() : usage variations *** -- Iteration 1 -- string(10) "helloworld" @@ -107,12 +107,20 @@ string(10) "helloworld" -- Iteration 11 -- string(10) "helloworld" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(10) "helloworld" -- Iteration 16 -- string(10) "helloworld" diff --git a/ext/standard/tests/strings/stripos.phpt b/ext/standard/tests/strings/stripos.phpt index f56d38d3de7bd..4036fa19b6af9 100644 --- a/ext/standard/tests/strings/stripos.phpt +++ b/ext/standard/tests/strings/stripos.phpt @@ -28,7 +28,7 @@ stripos() function test ?> DONE ---EXPECT-- +--EXPECTF-- int(0) int(5) int(5) @@ -43,13 +43,25 @@ bool(false) bool(false) int(0) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) int(1) diff --git a/ext/standard/tests/strings/stripos_variation1.phpt b/ext/standard/tests/strings/stripos_variation1.phpt index e205913fcfb00..e3c7fd9b295f9 100644 --- a/ext/standard/tests/strings/stripos_variation1.phpt +++ b/ext/standard/tests/strings/stripos_variation1.phpt @@ -74,7 +74,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with double quoted strings *** -- Iteration 1 -- int(2) @@ -110,10 +110,18 @@ int(9) int(8) bool(false) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(11) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(12) -- Iteration 14 -- int(0) diff --git a/ext/standard/tests/strings/stripos_variation2.phpt b/ext/standard/tests/strings/stripos_variation2.phpt index 2f95822645bfa..1562d459debdc 100644 --- a/ext/standard/tests/strings/stripos_variation2.phpt +++ b/ext/standard/tests/strings/stripos_variation2.phpt @@ -76,7 +76,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing stripos() function: with single quoted strings *** -- Iteration 1 -- int(2) @@ -112,10 +112,18 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(11) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(12) -- Iteration 14 -- int(0) diff --git a/ext/standard/tests/strings/stristr_variation2.phpt b/ext/standard/tests/strings/stristr_variation2.phpt index 72d5a93df8a63..bb4a6fc5744d0 100644 --- a/ext/standard/tests/strings/stristr_variation2.phpt +++ b/ext/standard/tests/strings/stristr_variation2.phpt @@ -65,7 +65,7 @@ foreach($inputs as $input) { fclose($file_handle); //closing the file handle ?> ---EXPECT-- +--EXPECTF-- *** Testing stristr() function: with unexpected inputs for 'needle' argument *** -- Iteration 1 -- bool(false) @@ -88,12 +88,20 @@ stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 10 -- stristr(): Argument #2 ($needle) must be of type string, array given -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(11) "Hello World" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(11) "Hello World" -- Iteration 15 -- bool(false) diff --git a/ext/standard/tests/strings/strlen.phpt b/ext/standard/tests/strings/strlen.phpt index 426154504b66b..1dac0925cf2b4 100644 --- a/ext/standard/tests/strings/strlen.phpt +++ b/ext/standard/tests/strings/strlen.phpt @@ -49,8 +49,9 @@ $strings = array( "Hello, World", /* loop through to find the length of each string */ for($i=0; $i "; - var_dump( strlen($strings[$i]) ); + var_dump($result); } @@ -142,7 +143,11 @@ String length of '0' is => int(1) String length of '0' is => int(1) String length of ' ' is => int(1) String length of '\t' is => int(2) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d String length of '1' is => int(1) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d String length of '' is => int(0) String length of 'Hello, World%0' is => int(13) String length of 'Hello%0World' is => int(11) diff --git a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt index dff57b3372089..188e40428765f 100644 --- a/ext/standard/tests/strings/strnatcasecmp_variation1.phpt +++ b/ext/standard/tests/strings/strnatcasecmp_variation1.phpt @@ -38,8 +38,10 @@ str_dump("\x0", "\0"); str_dump($a, $b); ?> ---EXPECT-- +--EXPECTF-- *** Testing strnatcasecmp() : variation *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(1) int(1) int(-1) diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt index 449601f6e5480..5b3efe545e5d9 100644 --- a/ext/standard/tests/strings/strpos.phpt +++ b/ext/standard/tests/strings/strpos.phpt @@ -59,8 +59,9 @@ $needles = array( /* loop through to get the "needle" position in $string */ for( $i = 0; $i < count($needles); $i++ ) { + $result = strpos($string, $needles[$i]); echo "Position of '$needles[$i]' is => "; - var_dump( strpos($string, $needles[$i]) ); + var_dump($result); } @@ -205,10 +206,14 @@ Position of '-3.344' is => int(19) Position of 'NULL' is => int(31) Position of '0' is => int(12) Position of '0' is => int(12) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Position of '1' is => int(13) Position of 'TRUE' is => int(36) Position of '1' is => int(13) Position of '1' is => int(13) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Position of '' is => int(0) Position of 'FALSE' is => int(41) Position of ' ' is => int(5) diff --git a/ext/standard/tests/strings/strrchr_variation1.phpt b/ext/standard/tests/strings/strrchr_variation1.phpt index 3e71728ef880a..c782bdacbba70 100644 --- a/ext/standard/tests/strings/strrchr_variation1.phpt +++ b/ext/standard/tests/strings/strrchr_variation1.phpt @@ -120,10 +120,14 @@ string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(45) "%0 $&!#%\o,()*+-./:;<=>?@hello123456he #4 A " diff --git a/ext/standard/tests/strings/strrchr_variation2.phpt b/ext/standard/tests/strings/strrchr_variation2.phpt index 646f13a702e4d..e1448ff83789d 100644 --- a/ext/standard/tests/strings/strrchr_variation2.phpt +++ b/ext/standard/tests/strings/strrchr_variation2.phpt @@ -74,7 +74,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrchr() function: with various single quoted strings *** -- Iteration 1 -- string(22) "lo123456he \x234 \101 " @@ -110,9 +110,13 @@ bool(false) string(5) "\101 " -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Iteration 14 -- diff --git a/ext/standard/tests/strings/strripos_variation1.phpt b/ext/standard/tests/strings/strripos_variation1.phpt index 57ae8dd11a65f..8e0eea0eae1f7 100644 --- a/ext/standard/tests/strings/strripos_variation1.phpt +++ b/ext/standard/tests/strings/strripos_variation1.phpt @@ -66,7 +66,7 @@ foreach ($needles as $needle) { $count++; } ?> ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with double quoted strings *** -- Iteration 1 -- int(28) @@ -124,14 +124,30 @@ int(8) bool(false) int(8) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(43) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(44) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(43) -- Iteration 14 -- int(44) diff --git a/ext/standard/tests/strings/strripos_variation2.phpt b/ext/standard/tests/strings/strripos_variation2.phpt index 12bcc2d22bb69..a6f2d64b22ca4 100644 --- a/ext/standard/tests/strings/strripos_variation2.phpt +++ b/ext/standard/tests/strings/strripos_variation2.phpt @@ -67,7 +67,7 @@ foreach ($needles as $needle) { $count++; } ?> ---EXPECT-- +--EXPECTF-- *** Testing strripos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -125,14 +125,30 @@ int(10) bool(false) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(53) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(53) -- Iteration 14 -- int(54) diff --git a/ext/standard/tests/strings/strrpos_variation2.phpt b/ext/standard/tests/strings/strrpos_variation2.phpt index 0022d0e2c3f38..63114af3abb7a 100644 --- a/ext/standard/tests/strings/strrpos_variation2.phpt +++ b/ext/standard/tests/strings/strrpos_variation2.phpt @@ -66,7 +66,7 @@ for($index=0; $index ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with single quoted strings *** -- Iteration 1 -- int(32) @@ -102,10 +102,18 @@ bool(false) int(10) int(10) -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(54) -- Iteration 14 -- int(54) diff --git a/ext/standard/tests/strings/strrpos_variation7.phpt b/ext/standard/tests/strings/strrpos_variation7.phpt index f73d4129d5c4d..303170ca54581 100644 --- a/ext/standard/tests/strings/strrpos_variation7.phpt +++ b/ext/standard/tests/strings/strrpos_variation7.phpt @@ -20,10 +20,12 @@ var_dump( strrpos($empty_string, FALSE) ); echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strrpos() function: with heredoc strings *** -- With empty heredoc string -- int(0) strrpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d int(0) *** Done *** diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt index f5a2d80318b74..9ddec15cfffbe 100644 --- a/ext/standard/tests/strings/strstr.phpt +++ b/ext/standard/tests/strings/strstr.phpt @@ -224,6 +224,8 @@ string(73) "012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 15 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" @@ -244,6 +246,8 @@ string(72) "12033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" -- Iteration 19 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(85) "Hello world,012033 -3.3445 NULL TRUE FALSE%0 abcd\xxyz %00 octal abcd$:Hello world" diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt index efea4022d05c9..e72fb79cf339a 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt @@ -213,9 +213,13 @@ string(31) "$$$$$$!!!!@@@@@@@ abcdef !!!***" string(13) "abcd%0abcdabcd" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" *** Testing strtolower() with two different case strings *** diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt index f0254905dc8a4..a95f6c12c56bc 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt @@ -214,9 +214,13 @@ string(31) "$$$$$$!!!!@@@@@@@ ABCDEF !!!***" string(13) "ABCD%0ABCDABCD" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" *** Testing strtoupper() with two different case strings *** diff --git a/ext/standard/tests/strings/strtr_variation4.phpt b/ext/standard/tests/strings/strtr_variation4.phpt index f89ff654a1869..e6b62aa6f31b9 100644 --- a/ext/standard/tests/strings/strtr_variation4.phpt +++ b/ext/standard/tests/strings/strtr_variation4.phpt @@ -45,7 +45,7 @@ for($index = 0; $index < count($str_arr); $index++) { } echo "*** Done ***"; ?> ---EXPECT-- +--EXPECTF-- *** Testing strtr() : empty string & null for 'str' arg *** -- Iteration 1 -- string(0) "" @@ -54,10 +54,18 @@ string(0) "" string(0) "" string(0) "" -- Iteration 3 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 4 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" -- Iteration 5 -- string(0) "" diff --git a/ext/standard/tests/strings/strtr_variation6.phpt b/ext/standard/tests/strings/strtr_variation6.phpt index 438eb168fae55..0e693d5b2cdea 100644 --- a/ext/standard/tests/strings/strtr_variation6.phpt +++ b/ext/standard/tests/strings/strtr_variation6.phpt @@ -95,12 +95,20 @@ strtr(): Argument #2 ($from) must be of type string, array given -- Iteration 9 -- strtr(): Argument #2 ($from) must be of type string, array given -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "0a2atm" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "012atm" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "0a2atm" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(6) "012atm" -- Iteration 14 -- diff --git a/ext/standard/tests/strings/strtr_variation8.phpt b/ext/standard/tests/strings/strtr_variation8.phpt index d68c6f04e75bb..09cbc78a27fa6 100644 --- a/ext/standard/tests/strings/strtr_variation8.phpt +++ b/ext/standard/tests/strings/strtr_variation8.phpt @@ -105,15 +105,23 @@ string(6) "012atm" string(6) "122atm" -- Iteration 10 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d strtr(): Argument #2 ($from) must be of type array, string given -- Iteration 14 -- diff --git a/ext/standard/tests/strings/trim1.phpt b/ext/standard/tests/strings/trim1.phpt index e0cdbea1c899f..50fa07dd2eeff 100644 --- a/ext/standard/tests/strings/trim1.phpt +++ b/ext/standard/tests/strings/trim1.phpt @@ -46,6 +46,8 @@ string(0) "" string(1) "0" string(1) "0" string(13) " testing trim" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(15) " testing trim " *** Testing with OBJECTS *** diff --git a/ext/standard/tests/strings/ucfirst.phpt b/ext/standard/tests/strings/ucfirst.phpt index 1cae286d98a9a..6bf24b5138851 100644 --- a/ext/standard/tests/strings/ucfirst.phpt +++ b/ext/standard/tests/strings/ucfirst.phpt @@ -118,11 +118,15 @@ string(6) "-3.344" string(4) "NULL" string(1) "0" string(1) "0" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" string(4) "TRUE" string(1) "1" string(1) "1" string(8) "1.234444" + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" string(5) "FALSE" string(1) " " diff --git a/ext/zlib/tests/bug71417.phpt b/ext/zlib/tests/bug71417.phpt index eac0d7efed1de..d84b82b82bf07 100644 --- a/ext/zlib/tests/bug71417.phpt +++ b/ext/zlib/tests/bug71417.phpt @@ -69,22 +69,30 @@ test(4); gzdecode(): Warning: gzdecode(): data error in %s on line %d +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: fread(): zlib: data error in %s on line %d read: bool(false) gzdecode(): Warning: gzdecode(): data error in %s on line %d +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + read: string(32) "The quick brown fox jumps over t" gzdecode(): Warning: gzdecode(): data error in %s on line %d +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: fread(): zlib: data error in %s on line %d read: bool(false) gzdecode(): Warning: gzdecode(): data error in %s on line %d +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: fread(): zlib: data error in %s on line %d read: bool(false) diff --git a/run-tests.php b/run-tests.php index 4b18190074873..4a26098f5080e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -830,8 +830,8 @@ function write_information(): void PHP_VERSION : " , phpversion() , " ZEND_VERSION: " , zend_version() , " PHP_OS : " , PHP_OS , " - " , php_uname() , " -INI actual : " , realpath(get_cfg_var("cfg_file_path")) , " -More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>'; +INI actual : " , realpath((string) get_cfg_var("cfg_file_path")) , " +More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", (string) php_ini_scanned_files()) : "** not determined **"); ?>'; save_text($info_file, $php_info); $info_params = []; settings2array($ini_overwrites, $info_params); @@ -2759,7 +2759,7 @@ function run_test(string $php, $file, array $env): string if (strpos($log_format, 'S') !== false) { $env_lines = []; foreach ($env as $env_var => $env_val) { - $env_lines[] = "export $env_var=" . escapeshellarg($env_val ?? ""); + $env_lines[] = "export $env_var=" . (string) escapeshellarg($env_val ?? ""); } $exported_environment = $env_lines ? "\n" . implode("\n", $env_lines) . "\n" : ""; $sh_script = << ", $text; } } diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt index 6993a6776d197..5b9ad95b95bd1 100644 --- a/sapi/cli/tests/upload_2G.phpt +++ b/sapi/cli/tests/upload_2G.phpt @@ -19,7 +19,8 @@ if (!file_exists('/proc/meminfo')) { $free_ram = 0; if ($f = fopen("/proc/meminfo","r")) { while (!feof($f)) { - if (preg_match('/MemFree[^\d]*(\d+)/i', fgets($f), $m)) { + $r = fgets($f); + if ($r !== false && preg_match('/MemFree[^\d]*(\d+)/i', $r, $m)) { $free_ram = max($free_ram, $m[1]/1024/1024); if ($free_ram > 3) { $enough_free_ram = true; diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index 9ce4c1a0918a6..d3b11c7cdcff6 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -687,7 +687,7 @@ class Tester if (is_null($line)) { break; } - if ((empty($ignore) || !strpos($line, $ignore)) && (!$skipBlank || strlen(trim($line)) > 0)) { + if ((empty($ignore) || $line !== false && !strpos($line, $ignore)) && (!$skipBlank || strlen(trim($line)) > 0)) { $lines[] = $line; $number--; } From a8b579b36a9d2ad54191b61a168f34118a0d6504 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 28 Jun 2021 12:30:12 +0200 Subject: [PATCH 2/3] Fix windows tests --- .../tests/file/005_variation2-win32.phpt | 33 ++++++++++++------- .../file_get_contents_variation8-win32.phpt | 4 +++ .../file_put_contents_variation8-win32.phpt | 6 ++++ ext/standard/tests/file/fread_variation4.phpt | 8 ++--- .../tests/file/glob_variation-win32-mb.phpt | 14 ++++++++ .../tests/file/glob_variation-win32.phpt | 14 ++++++++ .../file/readfile_variation10-win32.phpt | 4 +++ .../tests/file/rename_variation13-win32.phpt | 12 +++++++ .../tests/file/tempnam_variation3-win32.phpt | 12 +++++++ .../tests/file/tempnam_variation7-win32.phpt | 4 +++ .../tests/file/unlink_error-win32-mb.phpt | 4 +++ .../tests/file/unlink_error-win32.phpt | 4 +++ .../escapeshellarg_variation1-win32.phpt | 10 +++++- .../tests/strings/strtolower-win32.phpt | 4 +++ .../tests/strings/strtoupper1-win32.phpt | 4 +++ run-tests.php | 2 +- 16 files changed, 122 insertions(+), 17 deletions(-) diff --git a/ext/standard/tests/file/005_variation2-win32.phpt b/ext/standard/tests/file/005_variation2-win32.phpt index 9f5b7ba6795d6..a3d65ba685935 100644 --- a/ext/standard/tests/file/005_variation2-win32.phpt +++ b/ext/standard/tests/file/005_variation2-win32.phpt @@ -13,14 +13,17 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { function stat_fn( $filename ) { echo "\n-- File '$filename' --\n"; + $result = fileatime($filename); echo "-- File access time is => "; - echo fileatime($filename)."\n"; + echo $result."\n"; clearstatcache(); + $result = filemtime($filename); echo "-- File modification time is => "; - echo filemtime($filename)."\n"; + echo $result."\n"; clearstatcache(); + $result = filectime($filename); echo "-- inode change time is => "; - echo filectime($filename)."\n"; + echo $result."\n"; clearstatcache(); @@ -48,8 +51,14 @@ echo "Done"; *** testing file info *** -- File '' -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d -- File access time is => + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d -- File modification time is => + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d -- inode change time is => -- File '' -- @@ -58,28 +67,30 @@ echo "Done"; -- inode change time is => -- File ' ' -- --- File access time is => + Warning: fileatime(): stat failed for in %s on line %d +-- File access time is => --- File modification time is => Warning: filemtime(): stat failed for in %s on line %d +-- File modification time is => --- inode change time is => Warning: filectime(): stat failed for in %s on line %d - +-- inode change time is => -- File '|' -- --- File access time is => + Warning: fileatime(): stat failed for | in %s on line %d +-- File access time is => --- File modification time is => Warning: filemtime(): stat failed for | in %s on line %d +-- File modification time is => --- inode change time is => Warning: filectime(): stat failed for | in %s on line %d - +-- inode change time is => *** testing touch *** + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) bool(false) diff --git a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt index b6d801e9e701b..8f1870ab245c9 100644 --- a/ext/standard/tests/file/file_get_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation8-win32.phpt @@ -51,10 +51,14 @@ bool(false) -- Filename: TRUE -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: file_get_contents(1): Failed to open stream: No such file or directory in %s on line %d bool(false) -- Filename: FALSE -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Filename: "" -- diff --git a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt index dac2ba6d37ad3..ef18ce1f92c57 100644 --- a/ext/standard/tests/file/file_put_contents_variation8-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation8-win32.phpt @@ -52,9 +52,15 @@ foreach($names_arr as $key =>$value) { 9 bytes written to: '-1' -- Filename: TRUE -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d 9 bytes written to: '1' +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + -- Filename: FALSE -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Filename: "" -- diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index 407172d6a33b2..3de0f51e9763f 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -502,12 +502,12 @@ OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(1024) +int(%r1024|1137%r) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d OK -int(1024) +int(%r1024|1137%r) bool(false) -- File opened in mode x -- -- Reading beyond filesize, expected : 1024 bytes -- @@ -553,11 +553,11 @@ OK int(0) bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expected : 0 bytes -- -int(1024) +int(%r1024|1137%r) bool(false) Reading 10 bytes from file, expecting 0 bytes ... Notice: fread(): Read of 8192 bytes failed with errno=9 Bad file descriptor in %s on line %d OK -int(1024) +int(%r1024|1137%r) bool(false) Done diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index f34563db4b685..d7002796df2ba 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -381,18 +381,30 @@ array(0) { } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(1) { [0]=> string(%d) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } @@ -446,6 +458,8 @@ array(1) { string(%d) "%s/glob_variation私はガラスを食べられます/wonder1" } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } Done diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 74a1c3e5c7e42..d7733146fb014 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -380,18 +380,30 @@ array(0) { } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(1) { [0]=> string(%d) "1" } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } @@ -445,6 +457,8 @@ array(1) { string(%d) "%s/glob_variation/wonder1" } -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d array(0) { } Done diff --git a/ext/standard/tests/file/readfile_variation10-win32.phpt b/ext/standard/tests/file/readfile_variation10-win32.phpt index 325e47224dccb..cc2120d72b21d 100644 --- a/ext/standard/tests/file/readfile_variation10-win32.phpt +++ b/ext/standard/tests/file/readfile_variation10-win32.phpt @@ -48,9 +48,13 @@ Warning: readfile(-1): Failed to open stream: No such file or directory in %s on -- Filename: TRUE -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: readfile(1): Failed to open stream: No such file or directory in %s on line %d -- Filename: FALSE -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d ValueError: Path cannot be empty -- Filename: "" -- diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt index a2cf9a528d1b3..88956e44b890c 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt @@ -68,15 +68,27 @@ bool(true) Warning: rename(-1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d bool(false) -- 1 testing '1' boolean -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(true) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: rename(1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d bool(false) -- 2 testing '' boolean -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d bool(false) -- 3 testing '' string -- diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 5bc4f5ec884d1..ad99e4407efbc 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -91,15 +91,27 @@ rmdir($file_path); -- Iteration 0 -- OK -- Iteration 1 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d OK -- Iteration 3 -- OK -- Iteration 4 -- Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation3-win32.php on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d Failed, not created in the correct directory %s vs %s + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d 0 -- Iteration 5 -- tempnam(): Argument #2 ($prefix) must not contain any null bytes diff --git a/ext/standard/tests/file/tempnam_variation7-win32.phpt b/ext/standard/tests/file/tempnam_variation7-win32.phpt index b731c76449127..de6bbcf30fe5f 100644 --- a/ext/standard/tests/file/tempnam_variation7-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation7-win32.phpt @@ -72,11 +72,15 @@ File permissions are => 100666 File created in => temp dir -- Iteration 1 -- +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d File name is => %s%et%s File permissions are => 100666 File created in => temp dir -- Iteration 2 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d File name is => %s%et%s File permissions are => 100666 File created in => temp dir diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt index df98e2e367356..26e12adc03ae7 100644 --- a/ext/standard/tests/file/unlink_error-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt @@ -59,8 +59,12 @@ Warning: unlink(): %s in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: unlink(): %s in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Testing unlink() on non-existent file -- diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index 6bce3d4b80606..0df6afa3ca6d2 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -56,8 +56,12 @@ Warning: unlink(): %s in %s on line %d bool(false) bool(false) +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d + Warning: unlink(): %s in %s on line %d bool(false) + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d bool(false) -- Testing unlink() on non-existent file -- diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt index 752b1dfa7e331..2e71a46a8f29a 100644 --- a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt +++ b/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt @@ -55,7 +55,7 @@ foreach($inputs as $input) { $iterator++; }; ?> ---EXPECT-- +--EXPECTF-- *** Testing escapeshellarg() : usage variations *** -- Iteration 1 -- @@ -89,15 +89,23 @@ string(12) ""0.01234567"" string(5) ""0.5"" -- Iteration 11 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) ""1"" -- Iteration 12 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) """" -- Iteration 13 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(3) ""1"" -- Iteration 14 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(2) """" -- Iteration 15 -- diff --git a/ext/standard/tests/strings/strtolower-win32.phpt b/ext/standard/tests/strings/strtolower-win32.phpt index 516248346cf01..e45c754318b0e 100644 --- a/ext/standard/tests/strings/strtolower-win32.phpt +++ b/ext/standard/tests/strings/strtolower-win32.phpt @@ -330,9 +330,13 @@ string(31) "$$$$$$!!!!@@@@@@@ abcdef !!!***" string(13) "abcd%0abcdabcd" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" *** Testing strtolower() with two different case strings *** diff --git a/ext/standard/tests/strings/strtoupper1-win32.phpt b/ext/standard/tests/strings/strtoupper1-win32.phpt index c9328462cf7a9..7f8b948009694 100644 --- a/ext/standard/tests/strings/strtoupper1-win32.phpt +++ b/ext/standard/tests/strings/strtoupper1-win32.phpt @@ -332,9 +332,13 @@ string(31) "$$$$$$!!!!@@@@@@@ ABCDEF !!!***" string(13) "ABCD%0ABCDABCD" -- Iteration 6 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(1) "1" -- Iteration 7 -- + +Deprecated: Implicit bool to string coercion is deprecated in %s on line %d string(0) "" *** Testing strtoupper() with two different case strings *** diff --git a/run-tests.php b/run-tests.php index 4a26098f5080e..949a19a9e0f4e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2759,7 +2759,7 @@ function run_test(string $php, $file, array $env): string if (strpos($log_format, 'S') !== false) { $env_lines = []; foreach ($env as $env_var => $env_val) { - $env_lines[] = "export $env_var=" . (string) escapeshellarg($env_val ?? ""); + $env_lines[] = "export $env_var=" . escapeshellarg((string) ($env_val ?? "")); } $exported_environment = $env_lines ? "\n" . implode("\n", $env_lines) . "\n" : ""; $sh_script = << Date: Mon, 28 Jun 2021 14:26:58 +0200 Subject: [PATCH 3/3] Store appveyor bless artefacts Thanks to cmb69 for the suggestion. --- appveyor/test_task.bat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/appveyor/test_task.bat b/appveyor/test_task.bat index 7c559daee95ba..5f3a2c7b6f2c3 100644 --- a/appveyor/test_task.bat +++ b/appveyor/test_task.bat @@ -118,4 +118,11 @@ set EXIT_CODE=%errorlevel% appveyor PushArtifact %TEST_PHP_JUNIT% +if %EXIT_CODE% GEQ 1 ( + git checkout . + nmake run ARGS="scripts\dev\bless_tests.php ." + git diff > bless_tests.patch + appveyor PushArtifact bless_tests.patch +) + exit /b %EXIT_CODE%