3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s1 = "12345xxx"; $s2 = "12345 xxx"; $s3 = "12345.6xxx"; $s4 = "12345.6 xxx"; var_dump(++$s1); var_dump(++$s2); var_dump(++$s3); var_dump(++$s4); $s1 = "12345xxx"; $s2 = "12345 xxx"; $s3 = "12345.6xxx"; $s4 = "12345.6 xxx"; var_dump(--$s1); var_dump(--$s2); var_dump(--$s3); var_dump(--$s4); $s1 = "12345xxx"; $s2 = "12345 xxx"; $s3 = "12345.6xxx"; $s4 = "12345.6 xxx"; var_dump($s1++); var_dump($s2++); var_dump($s3++); var_dump($s4++); $s1 = "12345xxx"; $s2 = "12345 xxx"; $s3 = "12345.6xxx"; $s4 = "12345.6 xxx"; var_dump($s1--); var_dump($s2--); var_dump($s3--); var_dump($s4--);
Output for 8.5.0 - 8.5.3
Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 8 string(8) "12345xxy" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 9 string(9) "12345 xxy" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 10 string(10) "12345.6xxy" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 11 string(11) "12345.6 xxy" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 18 string(8) "12345xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 19 string(9) "12345 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 20 string(10) "12345.6xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 21 string(11) "12345.6 xxx" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 28 string(8) "12345xxx" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 29 string(9) "12345 xxx" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 30 string(10) "12345.6xxx" Deprecated: Increment on non-numeric string is deprecated, use str_increment() instead in /in/DsFTd on line 31 string(11) "12345.6 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 38 string(8) "12345xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 39 string(9) "12345 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 40 string(10) "12345.6xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 41 string(11) "12345.6 xxx"
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
string(8) "12345xxy" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 9 string(9) "12345 xxy" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 10 string(10) "12345.6xxy" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 11 string(11) "12345.6 xxy" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 18 string(8) "12345xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 19 string(9) "12345 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 20 string(10) "12345.6xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 21 string(11) "12345.6 xxx" string(8) "12345xxx" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 29 string(9) "12345 xxx" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 30 string(10) "12345.6xxx" Deprecated: Increment on non-alphanumeric string is deprecated in /in/DsFTd on line 31 string(11) "12345.6 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 38 string(8) "12345xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 39 string(9) "12345 xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 40 string(10) "12345.6xxx" Deprecated: Decrement on non-numeric string has no effect and is deprecated in /in/DsFTd on line 41 string(11) "12345.6 xxx"
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30
string(8) "12345xxy" string(9) "12345 xxy" string(10) "12345.6xxy" string(11) "12345.6 xxy" string(8) "12345xxx" string(9) "12345 xxx" string(10) "12345.6xxx" string(11) "12345.6 xxx" string(8) "12345xxx" string(9) "12345 xxx" string(10) "12345.6xxx" string(11) "12345.6 xxx" string(8) "12345xxx" string(9) "12345 xxx" string(10) "12345.6xxx" string(11) "12345.6 xxx"

preferences:
138.59 ms | 2446 KiB | 4 Q