From 08069165aad3784a2ea01114e22b3b2511ebcf4c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 9 Jul 2021 10:56:01 +0200 Subject: [PATCH] Deprecate ctype_*() on non-string arguments Non-string arguments will be interpreted as strings in the future. Warn about the upcoming behavior change. Part of https://wiki.php.net/rfc/deprecations_php_8_1. --- UPGRADING | 10 +++++ ext/ctype/ctype.c | 26 +++++++----- ext/ctype/tests/001.phpt | 11 +++-- ext/ctype/tests/002.phpt | 2 +- ext/ctype/tests/bug25745.phpt | 2 + ext/ctype/tests/bug34645.phpt | 3 +- ext/ctype/tests/ctype_alnum_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_alnum_variation2.phpt | 2 +- ext/ctype/tests/ctype_alpha_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_alpha_variation2.phpt | 2 +- ext/ctype/tests/ctype_cntrl_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_cntrl_variation2.phpt | 2 +- ext/ctype/tests/ctype_digit_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_digit_variation2.phpt | 2 +- ext/ctype/tests/ctype_graph_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_graph_variation2.phpt | 2 +- ext/ctype/tests/ctype_lower_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_lower_variation2.phpt | 2 +- ext/ctype/tests/ctype_print_basic.phpt | 4 +- ext/ctype/tests/ctype_print_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_print_variation2.phpt | 2 +- ext/ctype/tests/ctype_punct_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_punct_variation2.phpt | 2 +- ext/ctype/tests/ctype_space_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_space_variation2.phpt | 2 +- ext/ctype/tests/ctype_upper_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_upper_variation2.phpt | 2 +- ext/ctype/tests/ctype_xdigit_variation1.phpt | 42 +++++++++++++++++++- ext/ctype/tests/ctype_xdigit_variation2.phpt | 2 +- 29 files changed, 502 insertions(+), 40 deletions(-) diff --git a/UPGRADING b/UPGRADING index 64b26778a10..f86eb17d0a9 100644 --- a/UPGRADING +++ b/UPGRADING @@ -334,6 +334,16 @@ PHP 8.1 UPGRADE NOTES . Returning by reference from a void function is deprecated. RFC: https://wiki.php.net/rfc/deprecations_php_8_1 +- Ctype: + . Passing a non-string value to ctype_*() functions is deprecated. A future + version of PHP will make ctype_*() accept a string argument, which means + that either only strings will be accepted (strict_types=1) or inputs may be + converted to string (strict_types=0). In particular, using ctype_*($cp) to + check whether an ASCII codepoint given as integer satisfies a given ctype + predicate will no longer be supported. Instead ctype_*(chr($cp)) should be + used. + RFC: https://wiki.php.net/rfc/deprecations_php_8_1 + - Date: . The date_sunrise() and date_sunset() functions have been deprecated in favor of date_sun_info(). diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index d8882fdc895..939959bc090 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -69,6 +69,21 @@ static void ctype_impl( Z_PARAM_ZVAL(c) ZEND_PARSE_PARAMETERS_END(); + if (Z_TYPE_P(c) == IS_STRING) { + char *p = Z_STRVAL_P(c), *e = Z_STRVAL_P(c) + Z_STRLEN_P(c); + if (e == p) { + RETURN_FALSE; + } + while (p < e) { + if (!iswhat((int)*(unsigned char *)(p++))) { + RETURN_FALSE; + } + } + RETURN_TRUE; + } + + php_error_docref(NULL, E_DEPRECATED, + "Argument of type %s will be interpreted as string in the future", zend_zval_type_name(c)); if (Z_TYPE_P(c) == IS_LONG) { if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { RETURN_BOOL(iswhat((int)Z_LVAL_P(c))); @@ -79,17 +94,6 @@ static void ctype_impl( } else { RETURN_BOOL(allow_minus); } - } else if (Z_TYPE_P(c) == IS_STRING) { - char *p = Z_STRVAL_P(c), *e = Z_STRVAL_P(c) + Z_STRLEN_P(c); - if (e == p) { - RETURN_FALSE; - } - while (p < e) { - if(!iswhat((int)*(unsigned char *)(p++))) { - RETURN_FALSE; - } - } - RETURN_TRUE; } else { RETURN_FALSE; } diff --git a/ext/ctype/tests/001.phpt b/ext/ctype/tests/001.phpt index ba9fe48497d..50f38683376 100644 --- a/ext/ctype/tests/001.phpt +++ b/ext/ctype/tests/001.phpt @@ -2,17 +2,20 @@ ctype on integers --EXTENSIONS-- ctype +--INI-- +error_reporting=E_ALL&~E_DEPRECATED --FILE-- ---EXPECT-- +--EXPECTF-- +Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) int(394829384) diff --git a/ext/ctype/tests/ctype_alnum_variation1.phpt b/ext/ctype/tests/ctype_alnum_variation1.phpt index 0f9f5090c32..59458475dd0 100644 --- a/ext/ctype/tests/ctype_alnum_variation1.phpt +++ b/ext/ctype/tests/ctype_alnum_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_alnum() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_alnum(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_alnum(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_alnum(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 4 -- + +Deprecated: ctype_alnum(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_alnum(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_alnum(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_alnum(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_alnum(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_alnum(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_alnum(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_alnum(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_alnum(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_alnum(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_alnum(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_alnum(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_alnum(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_alnum(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_alnum(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_alnum(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_alnum(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_alnum_variation2.phpt b/ext/ctype/tests/ctype_alnum_variation2.phpt index 9651bedb144..385268555e9 100644 --- a/ext/ctype/tests/ctype_alnum_variation2.phpt +++ b/ext/ctype/tests/ctype_alnum_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_alnum() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_alnum($i)) { + if (ctype_alnum(chr($i))) { echo "character code $i is alpha numeric\n"; } } diff --git a/ext/ctype/tests/ctype_alpha_variation1.phpt b/ext/ctype/tests/ctype_alpha_variation1.phpt index c49bc57043f..31fb3a28def 100644 --- a/ext/ctype/tests/ctype_alpha_variation1.phpt +++ b/ext/ctype/tests/ctype_alpha_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_alpha() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_alpha(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_alpha(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_alpha(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_alpha(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_alpha(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_alpha(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_alpha(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_alpha(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_alpha(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_alpha(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_alpha(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_alpha(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_alpha(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_alpha(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_alpha(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_alpha(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_alpha(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_alpha_variation2.phpt b/ext/ctype/tests/ctype_alpha_variation2.phpt index e8f55a8b975..827fba29cfb 100644 --- a/ext/ctype/tests/ctype_alpha_variation2.phpt +++ b/ext/ctype/tests/ctype_alpha_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_alpha() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_alpha($i)) { + if (ctype_alpha(chr($i))) { echo "character code $i is alphabetic\n"; } } diff --git a/ext/ctype/tests/ctype_cntrl_variation1.phpt b/ext/ctype/tests/ctype_cntrl_variation1.phpt index 336b1f068ee..0faec5c803c 100644 --- a/ext/ctype/tests/ctype_cntrl_variation1.phpt +++ b/ext/ctype/tests/ctype_cntrl_variation1.phpt @@ -94,52 +94,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_cntrl() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_cntrl(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 2 -- + +Deprecated: ctype_cntrl(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 3 -- + +Deprecated: ctype_cntrl(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_cntrl(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_cntrl(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_cntrl(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_cntrl(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_cntrl(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_cntrl(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_cntrl(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_cntrl(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_cntrl(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_cntrl(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_cntrl(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_cntrl(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -149,6 +179,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_cntrl(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -161,13 +193,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_cntrl(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_cntrl(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_cntrl(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_cntrl(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_cntrl_variation2.phpt b/ext/ctype/tests/ctype_cntrl_variation2.phpt index c2d7e34f642..7ab36d97cb4 100644 --- a/ext/ctype/tests/ctype_cntrl_variation2.phpt +++ b/ext/ctype/tests/ctype_cntrl_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_cntrl() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_cntrl($i)) { + if (ctype_cntrl(chr($i))) { echo "character code $i is control character\n"; } } diff --git a/ext/ctype/tests/ctype_digit_variation1.phpt b/ext/ctype/tests/ctype_digit_variation1.phpt index 190c075a704..94aa2cd639a 100644 --- a/ext/ctype/tests/ctype_digit_variation1.phpt +++ b/ext/ctype/tests/ctype_digit_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_digit() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 4 -- + +Deprecated: ctype_digit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_digit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_digit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_digit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_digit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_digit(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_digit(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_digit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_digit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_digit(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_digit_variation2.phpt b/ext/ctype/tests/ctype_digit_variation2.phpt index 76300585cda..1bb6a174cd7 100644 --- a/ext/ctype/tests/ctype_digit_variation2.phpt +++ b/ext/ctype/tests/ctype_digit_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_digit() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_digit($i)) { + if (ctype_digit(chr($i))) { echo "character code $i is a numeric digit\n"; } } diff --git a/ext/ctype/tests/ctype_graph_variation1.phpt b/ext/ctype/tests/ctype_graph_variation1.phpt index 3a04e9c3f56..b82b9bd7758 100644 --- a/ext/ctype/tests/ctype_graph_variation1.phpt +++ b/ext/ctype/tests/ctype_graph_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_graph() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_graph(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_graph(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_graph(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 4 -- + +Deprecated: ctype_graph(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 5 -- + +Deprecated: ctype_graph(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_graph(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_graph(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_graph(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_graph(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_graph(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_graph(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_graph(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_graph(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_graph(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_graph(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_graph(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_graph(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_graph(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_graph(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_graph(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_graph_variation2.phpt b/ext/ctype/tests/ctype_graph_variation2.phpt index 3361798a054..23f3998b248 100644 --- a/ext/ctype/tests/ctype_graph_variation2.phpt +++ b/ext/ctype/tests/ctype_graph_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_graph() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_graph($i)) { + if (ctype_graph(chr($i))) { echo "character code $i is a printable character\n"; } } diff --git a/ext/ctype/tests/ctype_lower_variation1.phpt b/ext/ctype/tests/ctype_lower_variation1.phpt index 4c606caad71..ffc5b07ce36 100644 --- a/ext/ctype/tests/ctype_lower_variation1.phpt +++ b/ext/ctype/tests/ctype_lower_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_lower() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_lower(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_lower(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_lower(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_lower(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_lower(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_lower(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_lower(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_lower(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_lower(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_lower(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_lower(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_lower(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_lower(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_lower(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_lower(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_lower(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_lower(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_lower(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_lower(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_lower(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_lower_variation2.phpt b/ext/ctype/tests/ctype_lower_variation2.phpt index 86feadd15ce..598428b07ed 100644 --- a/ext/ctype/tests/ctype_lower_variation2.phpt +++ b/ext/ctype/tests/ctype_lower_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_lower() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_lower($i)) { + if (ctype_lower(chr($i))) { echo "character code $i is a lower case character\n"; } } diff --git a/ext/ctype/tests/ctype_print_basic.phpt b/ext/ctype/tests/ctype_print_basic.phpt index df3eeebaf10..08d308bc329 100644 --- a/ext/ctype/tests/ctype_print_basic.phpt +++ b/ext/ctype/tests/ctype_print_basic.phpt @@ -16,7 +16,9 @@ var_dump(ctype_print($c2)); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_print() : basic functionality *** bool(true) + +Deprecated: ctype_print(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_print_variation1.phpt b/ext/ctype/tests/ctype_print_variation1.phpt index 49f9e95ceee..102c5a834d6 100644 --- a/ext/ctype/tests/ctype_print_variation1.phpt +++ b/ext/ctype/tests/ctype_print_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_print() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_print(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_print(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_print(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 4 -- + +Deprecated: ctype_print(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 5 -- + +Deprecated: ctype_print(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_print(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_print(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_print(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_print(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_print(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_print(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_print(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_print(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_print(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_print(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_print(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_print(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_print(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_print(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_print(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_print_variation2.phpt b/ext/ctype/tests/ctype_print_variation2.phpt index 12617de81da..707b9252d49 100644 --- a/ext/ctype/tests/ctype_print_variation2.phpt +++ b/ext/ctype/tests/ctype_print_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_print() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_print($i)) { + if (ctype_print(chr($i))) { echo "character code $i is a printable character\n"; } } diff --git a/ext/ctype/tests/ctype_punct_variation1.phpt b/ext/ctype/tests/ctype_punct_variation1.phpt index 4fcf9bc61bf..fd6988d90cb 100644 --- a/ext/ctype/tests/ctype_punct_variation1.phpt +++ b/ext/ctype/tests/ctype_punct_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_punct() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_punct(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_punct(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_punct(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_punct(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_punct(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_punct(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_punct(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_punct(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_punct(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_punct(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_punct(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_punct(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_punct(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_punct(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_punct(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_punct(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_punct(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_punct(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_punct(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_punct(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_punct_variation2.phpt b/ext/ctype/tests/ctype_punct_variation2.phpt index 1a39cb499cf..0721cd14323 100644 --- a/ext/ctype/tests/ctype_punct_variation2.phpt +++ b/ext/ctype/tests/ctype_punct_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_punct() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($c = 1; $c < 256; $c++) { - if (ctype_punct($c)) { + if (ctype_punct(chr($c))) { echo "character code $c is punctuation\n"; } } diff --git a/ext/ctype/tests/ctype_space_variation1.phpt b/ext/ctype/tests/ctype_space_variation1.phpt index a2622fa5036..f28d10425ca 100644 --- a/ext/ctype/tests/ctype_space_variation1.phpt +++ b/ext/ctype/tests/ctype_space_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_space() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_space(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_space(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_space(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_space(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_space(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_space(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_space(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_space(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_space(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_space(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_space(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_space(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_space(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_space(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_space(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_space(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_space(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_space(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_space(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_space(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_space_variation2.phpt b/ext/ctype/tests/ctype_space_variation2.phpt index 22d5b626884..ee10fdc6144 100644 --- a/ext/ctype/tests/ctype_space_variation2.phpt +++ b/ext/ctype/tests/ctype_space_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_space() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($c = 1; $c < 256; $c++) { - if (ctype_space($c)) { + if (ctype_space(chr($c))) { echo "character code $c is a space character\n"; } } diff --git a/ext/ctype/tests/ctype_upper_variation1.phpt b/ext/ctype/tests/ctype_upper_variation1.phpt index faca6a6eb47..b52e8c81798 100644 --- a/ext/ctype/tests/ctype_upper_variation1.phpt +++ b/ext/ctype/tests/ctype_upper_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_upper() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_upper(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_upper(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_upper(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 4 -- + +Deprecated: ctype_upper(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_upper(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_upper(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_upper(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_upper(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_upper(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_upper(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_upper(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_upper(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_upper(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_upper(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_upper(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_upper(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_upper(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_upper(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_upper(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_upper(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_upper_variation2.phpt b/ext/ctype/tests/ctype_upper_variation2.phpt index 2b5b6780127..75d1ef607d4 100644 --- a/ext/ctype/tests/ctype_upper_variation2.phpt +++ b/ext/ctype/tests/ctype_upper_variation2.phpt @@ -13,7 +13,7 @@ echo "*** Testing ctype_upper() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for ($i = 0; $i < 256; $i++) { - if (ctype_upper($i)) { + if (ctype_upper(chr($i))) { echo "character code $i is a uppercase character\n"; } } diff --git a/ext/ctype/tests/ctype_xdigit_variation1.phpt b/ext/ctype/tests/ctype_xdigit_variation1.phpt index f753ff681c2..3dbd7cec376 100644 --- a/ext/ctype/tests/ctype_xdigit_variation1.phpt +++ b/ext/ctype/tests/ctype_xdigit_variation1.phpt @@ -93,52 +93,82 @@ fclose($fp); setlocale(LC_CTYPE, $orig); ?> ---EXPECT-- +--EXPECTF-- *** Testing ctype_xdigit() : usage variations *** -- Iteration 1 -- + +Deprecated: ctype_xdigit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 2 -- + +Deprecated: ctype_xdigit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 3 -- + +Deprecated: ctype_xdigit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(true) -- Iteration 4 -- + +Deprecated: ctype_xdigit(): Argument of type int will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 5 -- + +Deprecated: ctype_xdigit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 6 -- + +Deprecated: ctype_xdigit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 7 -- + +Deprecated: ctype_xdigit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 8 -- + +Deprecated: ctype_xdigit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 9 -- + +Deprecated: ctype_xdigit(): Argument of type float will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 10 -- + +Deprecated: ctype_xdigit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 11 -- + +Deprecated: ctype_xdigit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 12 -- + +Deprecated: ctype_xdigit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 13 -- + +Deprecated: ctype_xdigit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 14 -- + +Deprecated: ctype_xdigit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 15 -- + +Deprecated: ctype_xdigit(): Argument of type bool will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 16 -- @@ -148,6 +178,8 @@ bool(false) bool(false) -- Iteration 18 -- + +Deprecated: ctype_xdigit(): Argument of type array will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 19 -- @@ -160,13 +192,21 @@ bool(true) bool(true) -- Iteration 22 -- + +Deprecated: ctype_xdigit(): Argument of type classA will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 23 -- + +Deprecated: ctype_xdigit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 24 -- + +Deprecated: ctype_xdigit(): Argument of type null will be interpreted as string in the future in %s on line %d bool(false) -- Iteration 25 -- + +Deprecated: ctype_xdigit(): Argument of type resource will be interpreted as string in the future in %s on line %d bool(false) diff --git a/ext/ctype/tests/ctype_xdigit_variation2.phpt b/ext/ctype/tests/ctype_xdigit_variation2.phpt index e343f3ab3e2..0b1e65f4a1e 100644 --- a/ext/ctype/tests/ctype_xdigit_variation2.phpt +++ b/ext/ctype/tests/ctype_xdigit_variation2.phpt @@ -14,7 +14,7 @@ echo "*** Testing ctype_xdigit() : usage variations ***\n"; $orig = setlocale(LC_CTYPE, "C"); for($c = 1; $c < 256; $c++) { - if (ctype_xdigit($c)) { + if (ctype_xdigit(chr($c))) { echo "character code $c is a hexadecimal 'digit'\n"; } }