mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
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.
This commit is contained in:
parent
a09754b3d3
commit
08069165aa
29 changed files with 502 additions and 40 deletions
10
UPGRADING
10
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().
|
||||
|
|
|
@ -69,17 +69,7 @@ static void ctype_impl(
|
|||
Z_PARAM_ZVAL(c)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
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)));
|
||||
} else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) {
|
||||
RETURN_BOOL(iswhat((int)Z_LVAL_P(c) + 256));
|
||||
} else if (Z_LVAL_P(c) >= 0) {
|
||||
RETURN_BOOL(allow_digits);
|
||||
} else {
|
||||
RETURN_BOOL(allow_minus);
|
||||
}
|
||||
} else if (Z_TYPE_P(c) == IS_STRING) {
|
||||
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;
|
||||
|
@ -90,6 +80,20 @@ static void ctype_impl(
|
|||
}
|
||||
}
|
||||
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)));
|
||||
} else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) {
|
||||
RETURN_BOOL(iswhat((int)Z_LVAL_P(c) + 256));
|
||||
} else if (Z_LVAL_P(c) >= 0) {
|
||||
RETURN_BOOL(allow_digits);
|
||||
} else {
|
||||
RETURN_BOOL(allow_minus);
|
||||
}
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
ctype on integers
|
||||
--EXTENSIONS--
|
||||
ctype
|
||||
--INI--
|
||||
error_reporting=E_ALL&~E_DEPRECATED
|
||||
--FILE--
|
||||
<?php
|
||||
setlocale(LC_ALL,"C");
|
||||
|
@ -13,6 +15,7 @@ ctype
|
|||
}
|
||||
echo "$function $n\n";
|
||||
}
|
||||
|
||||
ctype_test_001("ctype_lower");
|
||||
ctype_test_001("ctype_upper");
|
||||
ctype_test_001("ctype_alpha");
|
||||
|
|
|
@ -13,7 +13,7 @@ function ctype_test_002($function) {
|
|||
// test portable POSIX characters 0..127
|
||||
for ($a=0;$a<128;$a++) {
|
||||
$c = chr($a);
|
||||
if($function($a)) $n1++;
|
||||
if($function($c)) $n1++;
|
||||
if($function("$c$c$c")) $n2++;
|
||||
if($function("1-$c$c$c-x")) $n3++;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
Bug #25745 (ctype functions fail with non-ascii characters)
|
||||
--EXTENSIONS--
|
||||
ctype
|
||||
--INI--
|
||||
error_reporting=E_ALL&~E_DEPRECATED
|
||||
--FILE--
|
||||
<?php
|
||||
$funcs = array(
|
||||
|
|
|
@ -8,6 +8,7 @@ $id = 394829384;
|
|||
var_dump(ctype_digit($id));
|
||||
var_dump($id);
|
||||
?>
|
||||
--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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue