3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Warnings in 8.3 $n = null; --$n; // Warning: Decrement on type null has no effect, this will change in the next major version of PHP var_dump($n); // NULL $false = false; --$false; // Warning: Decrement on type bool has no effect, this will change in the next major version of PHP var_dump($false); // bool(false) ++$false; // Warning: Increment on type bool has no effect, this will change in the next major version of PHP var_dump($false); // bool(false) $true = true; --$true; // Warning: Decrement on type bool has no effect, this will change in the next major version of PHP var_dump($true); // bool(true) ++$true; // Warning: Increment on type bool has no effect, this will change in the next major version of PHP var_dump($true); // bool(true) // Deprecations in 8.3 $empty = ""; --$empty; // Deprecated: Decrement on empty string is deprecated as non-numeric var_dump($empty); // int(-1) $s = "foo"; --$s; // Deprecated: Decrement on non-numeric string has no effect and is deprecated var_dump($s); // string(3) "foo" $s = "-cc"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); // string(3) "-cd" $s = "Z "; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); // string(2) "Z " $s = " Z"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); // string(2) " A" # Non-ASCII characters $s = "é"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); # string(2) "é" $s = "あいうえお"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); # string(15) "あいうえお" $s = "α"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); # string(2) "α" $s = "1f.5"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); # string(4) "1f.6" $s = "1.f.5"; ++$s; // Deprecated: Increment on non-alphanumeric string is deprecated var_dump($s); # string(5) "1.f.6" // Deprecations in 8.5 (PR already merged, test with git.master version) $s = "foo"; ++$s; // Deprecated: Increment on non-numeric string is deprecated var_dump($s); // string(3) "fop"

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.70.0100.00716.90
8.5.60.0110.00816.62
8.5.50.0070.00818.47
8.5.30.0070.01018.00
8.5.20.0110.00720.14
8.5.10.0100.00916.62
8.5.00.0120.00922.99
8.4.210.0140.00821.50
8.4.180.0130.01019.82
8.4.170.0140.00924.03
8.4.160.0100.01322.20
8.4.150.0070.00616.87
8.4.140.0350.01017.37
8.4.130.0360.00917.55
8.4.120.0380.00917.95
8.4.110.0400.00817.79
8.4.100.0410.00917.60
8.4.90.0440.01017.63
8.4.80.0410.00717.40
8.4.70.0340.01317.91
8.4.60.0440.00817.91
8.4.50.0400.01017.50
8.4.40.0390.00917.72
8.4.30.0400.00917.43
8.4.20.0410.00817.49
8.4.10.0390.01117.69
8.3.300.0110.00920.80
8.3.290.0140.00720.82
8.3.280.0050.00616.28
8.3.270.0330.01116.72
8.3.260.0380.00816.48
8.3.250.0350.01016.69
8.3.240.0370.00716.48
8.3.230.0390.00616.44
8.3.220.0460.00816.48
8.3.210.0400.01016.53
8.3.200.0360.00916.81
8.3.190.0350.01116.48
8.3.180.0370.00916.67
8.3.170.0380.01016.74
8.3.160.0410.00816.85
8.3.150.0410.00516.47
8.3.140.0430.00616.19
8.3.130.0390.00616.53
8.3.120.0440.00916.53
8.3.110.0380.00816.44
8.3.100.0460.00716.65
8.3.90.0400.00816.50
8.3.80.0360.01316.70
8.3.70.0400.00816.70
8.3.60.0360.01216.54
8.3.50.0360.01116.70
8.3.40.0400.00917.48
8.3.30.0300.00817.46
8.3.20.0270.01517.63
8.3.10.0360.00517.49
8.3.00.0270.01017.54
8.2.300.0100.01020.04
8.2.290.0260.01116.59
8.2.280.0280.01116.51
8.2.270.0330.00716.58
8.2.260.0300.01116.49
8.2.250.0310.00816.34
8.2.240.0310.01016.19
8.2.230.0370.00716.25
8.2.220.0320.00816.19
8.2.210.0360.00516.19
8.2.200.0360.01216.48
8.2.190.0330.00816.59
8.2.180.0330.00716.39
8.2.170.0340.00917.63
8.2.160.0330.01117.57
8.2.150.0360.00817.41
8.2.140.0340.01017.50
8.2.130.0350.00917.36
8.2.120.0410.01117.55
8.2.110.0370.00617.24
8.2.100.0350.00817.55
8.2.90.0310.01117.57
8.2.80.0330.00917.35
8.2.70.0340.00917.36
8.2.60.0340.01517.41
8.2.50.0310.01117.37
8.2.40.0430.01017.29
8.2.30.0290.00917.45
8.2.20.0290.00917.32
8.2.10.0280.01017.35
8.2.00.0280.01117.45
8.1.340.0100.00921.63

preferences:
53.62 ms | 959 KiB | 5 Q