1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Enact follow-up phase of the "Path to Saner Increment/Decrement operators" RFC (#19374)

RFC: https://wiki.php.net/rfc/deprecations_php_8_5#enact_follow-up_phase_of_the_path_to_saner_incrementdecrement_operators_rfc
This commit is contained in:
Gina Peter Banyard
2025-08-23 14:36:39 +01:00
committed by GitHub
parent e27c436607
commit 93716bece4
25 changed files with 188 additions and 104 deletions

View File

@@ -22,7 +22,22 @@ function test2() {
var_dump(test2());
?>
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "test"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Warning: Array to string conversion in %s on line %d
string(9) "Arraytest"

View File

@@ -17,6 +17,8 @@ $strtoupper = 'strtolower';
var_dump(${${++$a}}('FOO') == 'foo');
?>
--EXPECT--
--EXPECTF--
bool(true)
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
bool(true)

View File

@@ -13,5 +13,6 @@ $s++;
var_dump(Foo::from($s));
?>
--EXPECT--
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
enum(Foo::Bar)

View File

@@ -13,5 +13,6 @@ $s++;
var_dump(Foo::tryFrom($s));
?>
--EXPECT--
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
enum(Foo::Bar)

View File

@@ -57,11 +57,11 @@ foreach ($values as $value) {
Using increment:
Initial value:string(0) ""
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(1) "1"
Initial value:string(1) " "
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(1) " "
Initial value:string(1) "0"
Result value:int(1)
@@ -70,20 +70,28 @@ Result value:float(16.5)
Initial value:string(4) "1e10"
Result value:float(10000000001)
Initial value:string(4) "199A"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(4) "199B"
Initial value:string(4) "A199"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(4) "A200"
Initial value:string(4) "199Z"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(4) "200A"
Initial value:string(4) "Z199"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(4) "Z200"
Initial value:string(11) "Hello world"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(11) "Hello worle"
Initial value:string(4) "🐘"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(4) "🐘"
Using decrement:
Initial value:string(0) ""

View File

@@ -41,31 +41,35 @@ foreach ($values as $value) {
}
?>
--EXPECT--
Deprecated: Increment on non-alphanumeric string is deprecated
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(0) ""
Deprecated: Decrement on empty string is deprecated as non-numeric
string(0) ""
Deprecated: Increment on non-alphanumeric string is deprecated
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(1) " "
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(1) " "
string(4) "199B"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(4) "199A"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(4) "199B"
string(4) "A200"
string(4) "199A"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(4) "A199"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(4) "A200"
string(4) "200A"
string(4) "A199"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(4) "199Z"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(4) "200A"
string(4) "Z200"
string(4) "199Z"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(4) "Z199"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(4) "Z200"
Deprecated: Increment on non-alphanumeric string is deprecated
string(4) "Z199"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(11) "Hello world"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(11) "Hello world"
Deprecated: Increment on non-alphanumeric string is deprecated
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead
string(4) "🐘"
Deprecated: Decrement on non-numeric string has no effect and is deprecated
string(4) "🐘"

View File

@@ -63,11 +63,11 @@ Initial value:float(0)
Result value:float(1)
Initial value:string(0) ""
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(1) "1"
Initial value:string(1) " "
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Result value:string(1) " "
Initial value:string(1) "0"
Result value:int(1)

View File

@@ -31,8 +31,8 @@ var_dump($x);
DONE
--EXPECT--
string(1) "1"
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(4) "foo!"
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(1) "!"
DONE

View File

@@ -23,8 +23,8 @@ var_dump($x);
?>
DONE
--EXPECT--
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(4) "foo!"
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(1) "!"
DONE

View File

@@ -31,8 +31,8 @@ PRE DEC
Decrement on non-numeric string has no effect and is deprecated
string(1) " "
POST INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(1) " "
PRE INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(1) " "

View File

@@ -53,55 +53,72 @@ var_dump(++$s); // string(3) "5e0"
var_dump(++$s); // float(6)
?>
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "Ba"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "bA"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "B0"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "b0"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "AAa"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "aaA"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "10a"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "10A"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(1) "1"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "-cd"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "Z "
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) " A"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "é"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(15) "あいうえお"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "α"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "ω"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "Α"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "Ω"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(8) "foo1.txu"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "1f.6"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(9) "foo.1.txu"
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(5) "1.f.6"
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "5e0"
float(6)

View File

@@ -85,23 +85,23 @@ Decrement on type null has no effect, this will change in the next major version
NULL
Empty string
POST INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(0) ""
POST DEC
Decrement on empty string is deprecated as non-numeric
string(0) ""
PRE INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(1) "1"
PRE DEC
Decrement on empty string is deprecated as non-numeric
int(-1)
Non fill ASCII (only ++)
POST INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(4) " ad "
PRE INC
Increment on non-alphanumeric string is deprecated
Increment on non-numeric string is deprecated, use str_increment() instead
string(4) " ad "
Bool
POST INC

View File

@@ -98,23 +98,23 @@ string(87) "Decrement on type null has no effect, this will change in the next m
NULL
Empty string
POST INC
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(0) ""
POST DEC
string(54) "Decrement on empty string is deprecated as non-numeric"
string(0) ""
PRE INC
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(1) "1"
PRE DEC
string(54) "Decrement on empty string is deprecated as non-numeric"
int(-1)
Non fill ASCII (only ++)
POST INC
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(4) " ad "
PRE INC
string(50) "Increment on non-alphanumeric string is deprecated"
string(74) "Increment on non-numeric string is deprecated, use str_increment() instead"
string(4) " ad "
Bool
POST INC

View File

@@ -2104,6 +2104,7 @@ Cannot increment stdClass
Cannot decrement stdClass
Cannot increment resource
Cannot decrement resource
Warning: Increment on non-numeric string is deprecated, use str_increment() instead
No error for fop++
Warning: Decrement on non-numeric string has no effect and is deprecated
No error for foo--

View File

@@ -320,5 +320,7 @@ caught Exception 27
caught Exception 28
caught Exception 29
caught Exception 30
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
caught Exception 31
caught Exception 32

View File

@@ -2558,29 +2558,23 @@ static bool ZEND_FASTCALL increment_string(zval *str) /* {{{ */
int last=0; /* Shut up the compiler warning */
int ch;
zend_string *zstr = Z_STR_P(str);
zend_string_addref(zstr);
zend_error(E_DEPRECATED, "Increment on non-numeric string is deprecated, use str_increment() instead");
if (EG(exception)) {
zend_string_release(zstr);
return false;
}
/* A userland error handler can change the type from string to something else */
zval_ptr_dtor(str);
ZVAL_STR(str, zstr);
if (UNEXPECTED(Z_STRLEN_P(str) == 0)) {
zend_error(E_DEPRECATED, "Increment on non-alphanumeric string is deprecated");
if (EG(exception)) {
return false;
}
/* A userland error handler can change the type from string to something else */
zval_ptr_dtor(str);
ZVAL_CHAR(str, '1');
return true;
}
if (UNEXPECTED(!zend_string_only_has_ascii_alphanumeric(Z_STR_P(str)))) {
zend_string *zstr = Z_STR_P(str);
zend_string_addref(zstr);
zend_error(E_DEPRECATED, "Increment on non-alphanumeric string is deprecated");
if (EG(exception)) {
zend_string_release(zstr);
return false;
}
zval_ptr_dtor(str);
ZVAL_STR(str, zstr);
}
if (!Z_REFCOUNTED_P(str)) {
Z_STR_P(str) = zend_string_init(Z_STRVAL_P(str), Z_STRLEN_P(str), 0);
Z_TYPE_INFO_P(str) = IS_STRING_EX;

View File

@@ -39,6 +39,8 @@ object(FFI\CData:char)#%d (1) {
["cdata"]=>
string(1) "a"
}
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
object(FFI\CData:char)#%d (1) {
["cdata"]=>
string(1) "b"

View File

@@ -22,7 +22,8 @@ var_dump(inc(1.1));
var_dump(dec("5"));
var_dump(dec(1.1));
?>
--EXPECT--
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "abd"
int(6)
float(2.1)

View File

@@ -19,7 +19,11 @@ var_dump(++$test->prop);
var_dump(--$test->prop);
?>
--EXPECTF--
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Decrement on non-numeric string has no effect and is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(1) "c"
Deprecated: Decrement on non-numeric string has no effect and is deprecated in %s on line %d

View File

@@ -23,52 +23,52 @@ function test($b) {
test("0");
?>
--EXPECTF--
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
Deprecated: Decrement on non-numeric string has no effect and is deprecated in %s on line %d
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(5) "-INF0"
string(260) "0-2-12-112-1112-11112-111112-1111112-11111112-111111112-1111111112-11111111112-111111111112-1111111111112-11111111111112-111111111111112-1111111111111112-11111111111111112-111111111111111112-1111111111111111112-1.1111111111111E+20-1.1111111111111E+191-ING-INF1"

View File

@@ -34,3 +34,5 @@ $_main:
0006 RETURN int(1)
LIVE RANGES:
1: 0001 - 0005 (tmp/var)
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d

View File

@@ -15,5 +15,5 @@ foo();
?>
DONE
--EXPECTF--
Deprecated: Increment on non-alphanumeric string is deprecated in %ssccp_038.php on line 5
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %ssccp_038.php on line 5
DONE

View File

@@ -10,9 +10,9 @@ function polyfill(string $s): string {
/* Using increment operator would cast the string to float
* Therefore we manually increment it to convert it to an "f"/"F" that doesn't get affected */
$c = $s[$offset];
$c++;
@$c++;
$s[$offset] = $c;
$s++;
@$s++;
$s[$offset] = match ($s[$offset]) {
'f' => 'e',
'F' => 'E',
@@ -22,7 +22,7 @@ function polyfill(string $s): string {
return $s;
}
}
return ++$s;
return @++$s;
}
$strictlyAlphaNumeric = [

View File

@@ -28,30 +28,36 @@ float(2.2)
--- testing: '-7.7' ---
float(-6.7)
--- testing: 'abc' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "abd"
--- testing: '123abc' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(6) "123abd"
--- testing: '123e5' ---
float(12300001)
--- testing: '123e5xyz' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(8) "123e5xza"
--- testing: ' 123abc' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) " 123abd"
--- testing: '123 abc' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) "123 abd"
--- testing: '123abc ' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) "123abc "
--- testing: '3.4a' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "3.4b"
--- testing: 'a5.9' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "a5.0"

View File

@@ -28,48 +28,72 @@ float(2.2)
--- testing: '-7.7' ---
float(-6.7)
--- testing: 'abc' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "abd"
--- testing: '123abc' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(6) "123abd"
--- testing: '123e5' ---
float(12300001)
--- testing: '123e5xyz' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(8) "123e5xza"
--- testing: ' 123abc' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) " 123abd"
--- testing: '123 abc' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) "123 abd"
--- testing: '123abc ' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(7) "123abc "
--- testing: '3.4a' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "3.4b"
--- testing: 'a5.9' ---
Deprecated: Increment on non-alphanumeric string is deprecated in %s on line %d
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "a5.0"
--- testing: 'z' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "aa"
--- testing: 'az' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "ba"
--- testing: 'zz' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "aaa"
--- testing: 'Z' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "AA"
--- testing: 'AZ' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(2) "BA"
--- testing: 'ZZ' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "AAA"
--- testing: '9z' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "10a"
--- testing: '19z' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(3) "20a"
--- testing: '99z' ---
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in %s on line %d
string(4) "100a"