3v4l.org

run code in 300+ PHP versions simultaneously
<?PHP if (!function_exists('str_split')) { function str_split($s) { $r = array(); for ($i=0;$i<=strlen($s);$i++) { $r[] = substr($s, $i, 1); } return $r; } } function inc_uuid($uuid) { $n = ''; $c = 0; foreach (str_split(strrev($uuid)) as $s) { $c++; $s++; if ($s === 'aa') { $n = 'a'.$n; continue; } elseif ($s === 10) { $n .= 'a'; continue; } else { $n = $s.$n; break; } } $x = implode(array_slice(str_split($uuid), 0, strlen($uuid-$c)+1)); $n = $x.$n; return $n; } function get_uuid() { global $__uuid; if ($__uuid == NULL) { return '0a000000'; } else return inc_uuid($__uuid); } echo inc_uuid('a2b9'); ?>

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.3.60.0120.00318.56
8.3.50.0090.00622.03
8.3.40.0180.00319.11
8.3.30.0070.00719.04
8.3.20.0040.00420.32
8.3.10.0070.00422.04
8.3.00.0040.00422.57
8.2.180.0080.00816.63
8.2.170.0060.00922.96
8.2.160.0100.01020.81
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0020.00526.16
8.2.120.0040.00419.61
8.2.110.0100.00021.95
8.2.100.0070.00417.74
8.2.90.0050.00319.40
8.2.80.0050.00319.78
8.2.70.0030.00617.61
8.2.60.0080.00018.05
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0060.00318.14
8.2.20.0030.00517.77
8.2.10.0040.00417.79
8.2.00.0040.00417.78
8.1.280.0060.00925.92
8.1.270.0040.00422.19
8.1.260.0030.00626.35
8.1.250.0060.00328.09
8.1.240.0060.00323.91
8.1.230.0060.00619.10
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0050.00317.50
8.1.180.0060.00318.10
8.1.170.0120.00018.51
8.1.160.0030.00522.11
8.1.150.0050.00318.57
8.1.140.0040.00417.44
8.1.130.0050.00217.83
8.1.120.0070.00017.50
8.1.110.0000.00717.38
8.1.100.0060.00317.45
8.1.90.0040.00417.49
8.1.80.0040.00417.40
8.1.70.0030.00317.46
8.1.60.0040.00417.59
8.1.50.0000.00917.55
8.1.40.0040.00417.51
8.1.30.0040.00417.61
8.1.20.0060.00317.75
8.1.10.0000.00817.65
8.1.00.0040.00417.46
8.0.300.0000.00718.77
8.0.290.0030.00517.18
8.0.280.0040.00418.46
8.0.270.0080.00017.34
8.0.260.0060.00016.86
8.0.250.0030.00316.96
8.0.240.0000.01016.95
8.0.230.0040.00416.96
8.0.220.0000.00717.04
8.0.210.0030.00516.85
8.0.200.0040.00417.00
8.0.190.0000.00716.94
8.0.180.0000.00717.00
8.0.170.0070.00017.06
8.0.160.0040.00416.98
8.0.150.0030.00317.04
8.0.140.0030.00616.82
8.0.130.0030.00313.34
8.0.120.0070.00017.00
8.0.110.0000.00716.85
8.0.100.0020.00516.78
8.0.90.0070.00017.05
8.0.80.0120.00316.93
8.0.70.0040.00416.97
8.0.60.0070.00016.99
8.0.50.0070.00017.02
8.0.30.0130.00917.31
8.0.20.0110.00717.40
8.0.10.0040.00417.14
8.0.00.0090.00816.59
7.4.330.0000.00515.03
7.4.320.0060.00016.51
7.4.300.0030.00316.56
7.4.290.0030.00316.49
7.4.280.0040.00416.51
7.4.270.0030.00316.60
7.4.260.0100.00016.48
7.4.250.0000.00716.57
7.4.240.0040.00416.47
7.4.230.0000.00816.40
7.4.220.0070.01116.54
7.4.210.0080.00616.50
7.4.200.0050.00316.37
7.4.190.0080.00016.46
7.4.160.0140.00916.68
7.4.150.0070.01117.40
7.4.140.0140.00717.86
7.4.130.0110.00916.64
7.4.120.0090.00716.49
7.4.110.0150.00316.55
7.4.100.0100.00716.79
7.4.90.0110.00716.66
7.4.80.0280.01919.39
7.4.70.0080.00816.48
7.4.60.0030.01416.48
7.4.50.0000.00716.53
7.4.40.0040.01122.77
7.4.30.0100.00616.68
7.4.00.0060.00915.00
7.3.330.0080.00013.43
7.3.320.0050.00013.46
7.3.310.0040.00416.48
7.3.300.0030.00316.43
7.3.290.0000.01416.45
7.3.280.0080.01016.43
7.3.270.0110.00717.40
7.3.260.0090.00816.34
7.3.250.0100.00616.42
7.3.240.0140.00416.40
7.3.230.0100.00716.44
7.3.210.0130.00316.47
7.3.200.0160.00619.39
7.3.190.0120.01016.57
7.3.180.0160.00716.49
7.3.170.0100.01316.55
7.3.160.0130.00316.41
7.3.120.0030.01114.98
7.3.10.0060.00916.50
7.3.00.0130.00316.88
7.2.330.0100.00716.49
7.2.320.0090.01216.54
7.2.310.0110.00616.44
7.2.300.0030.01416.78
7.2.290.0120.00416.90
7.2.130.0080.00616.95
7.2.120.0090.00617.01
7.2.110.0040.00816.82
7.2.100.0040.01116.98
7.2.90.0040.01117.04
7.2.80.0080.01116.55
7.2.70.0040.00716.92
7.2.60.0080.00516.94
7.2.50.0090.00317.04
7.2.40.0000.01017.09
7.2.30.0040.01117.09
7.2.20.0080.00816.63
7.2.10.0000.00916.88
7.2.00.0030.01217.02
7.1.250.0030.00915.82
7.1.200.0000.01415.86
7.1.100.0060.00918.16
7.1.70.0000.00716.95
7.1.60.0070.01419.82
7.1.50.0000.01317.02
7.1.00.0070.07322.51
7.0.200.0040.00416.57
7.0.140.0000.07721.92
7.0.70.0070.04021.78
7.0.60.0100.07321.73
7.0.50.0100.03722.09
7.0.40.0030.05320.05
7.0.30.0030.06720.09
7.0.20.0030.07320.11
7.0.10.0070.09320.13
7.0.00.0030.06020.15
5.6.280.0030.07721.11
5.6.220.0000.08320.63
5.6.210.0000.08320.76
5.6.200.0030.07320.93
5.6.190.0130.07321.05
5.6.180.0030.04020.93
5.6.170.0030.08021.01
5.6.160.0030.08721.09
5.6.150.0000.06721.03
5.6.140.0070.08321.09
5.6.130.0130.07720.95
5.6.120.0130.07721.11
5.6.110.0070.05321.16
5.6.100.0100.08020.91
5.6.90.0030.09020.99
5.6.80.0170.08020.52
5.6.70.0030.06720.56
5.6.60.0030.08020.44
5.6.50.0030.06720.41
5.6.40.0000.08020.32
5.6.30.0070.07720.41
5.6.20.0070.06720.43
5.6.10.0070.05320.39
5.6.00.0070.05720.36
5.5.360.0070.04720.54
5.5.350.0100.09320.46
5.5.340.0070.07320.92
5.5.330.0070.08720.87
5.5.320.0000.04320.74
5.5.310.0070.08320.89
5.5.300.0030.07020.73
5.5.290.0070.08020.95
5.5.280.0070.06020.84
5.5.270.0030.08320.88
5.5.260.0030.06020.89
5.5.250.0070.03720.75
5.5.240.0000.05020.21
5.5.230.0130.07020.30
5.5.220.0070.07720.29
5.5.210.0030.06020.29
5.5.200.0100.05320.17
5.5.190.0070.07720.11
5.5.180.0000.08320.23
5.5.160.0030.08320.11
5.5.150.0030.06720.23
5.5.140.0200.04320.11
5.5.130.0100.07320.23
5.5.120.0100.07320.27
5.5.110.0170.05320.26
5.5.100.0030.05020.13
5.5.90.0070.07320.11
5.5.80.0030.07720.06
5.5.70.0070.08020.17
5.5.60.0100.05019.99
5.5.50.0000.05720.14
5.5.40.0070.07020.14
5.5.30.0100.05320.16
5.5.20.0030.07020.06
5.5.10.0270.05720.02
5.5.00.0000.04720.13
5.4.450.0070.07719.20
5.4.440.0030.04319.55
5.4.430.0070.07719.46
5.4.420.0000.08719.21
5.4.410.0070.04719.22
5.4.400.0000.07719.11
5.4.390.0070.07718.84
5.4.380.0070.07719.02
5.4.370.0000.07718.83
5.4.360.0070.08019.11
5.4.350.0070.07319.11
5.4.340.0000.07719.21
5.4.320.0030.08018.94
5.4.310.0030.04719.14
5.4.300.0070.08719.02
5.4.290.0030.04719.16
5.4.280.0070.07718.89
5.4.270.0000.08019.01
5.4.260.0000.08019.00
5.4.250.0000.08319.02
5.4.240.0070.08319.11
5.4.230.0070.07319.02
5.4.220.0130.06318.83
5.4.210.0070.05719.02
5.4.200.0030.05019.16
5.4.190.0070.07019.09
5.4.180.0000.08318.88
5.4.170.0030.05318.87
5.4.160.0100.06319.00
5.4.150.0030.07718.84
5.4.140.0070.06316.55
5.4.130.0070.06716.40
5.4.120.0130.07016.43
5.4.110.0100.04716.48
5.4.100.0100.06316.36
5.4.90.0000.07016.33
5.4.80.0070.05016.49
5.4.70.0000.06716.46
5.4.60.0070.07316.30
5.4.50.0000.04316.28
5.4.40.0000.07716.48
5.4.30.0070.06716.35
5.4.20.0030.05716.38
5.4.10.0030.07316.29
5.4.00.0030.07715.90
5.3.290.0100.07014.59
5.3.280.0030.04714.72
5.3.270.0030.05314.70
5.3.260.0000.06014.71
5.3.250.0100.07314.75
5.3.240.0030.07014.61
5.3.230.0030.04714.75
5.3.220.0070.04014.52
5.3.210.0000.08014.64
5.3.200.0000.06714.51
5.3.190.0030.07714.64
5.3.180.0000.07714.66
5.3.170.0070.05014.63
5.3.160.0070.06714.58
5.3.150.0070.07714.60
5.3.140.0070.05314.59
5.3.130.0000.08314.61
5.3.120.0030.07714.66
5.3.110.0000.08014.52
5.3.100.0070.06713.98
5.3.90.0000.05714.04
5.3.80.0030.07714.03
5.3.70.0000.07313.93
5.3.60.0070.04713.98
5.3.50.0030.07714.05
5.3.40.0030.07713.86
5.3.30.0070.07313.84
5.3.20.0000.05313.72
5.3.10.0000.04013.79
5.3.00.0000.04013.71
5.2.170.0070.05712.36
5.2.160.0030.06012.36
5.2.150.0100.05712.36
5.2.140.0000.05312.36
5.2.130.0000.03012.36
5.2.120.0030.03312.36
5.2.110.0030.04012.36
5.2.100.0030.05712.36
5.2.90.0030.06012.36
5.2.80.0000.05012.36
5.2.70.0030.06012.36
5.2.60.0000.05012.36
5.2.50.0070.04312.36
5.2.40.0030.04012.36
5.2.30.0100.05312.36
5.2.20.0000.06012.36
5.2.10.0000.06312.36
5.2.00.0000.03312.36
5.1.60.0070.04712.36
5.1.50.0070.04712.36
5.1.40.0070.05012.36
5.1.30.0070.04012.36
5.1.20.0000.06012.36
5.1.10.0030.05012.36
5.1.00.0030.04712.36
5.0.50.0030.04712.36
5.0.40.0000.02712.36
5.0.30.0000.03012.36
5.0.20.0000.03012.36
5.0.10.0030.04712.36
5.0.00.0000.04012.36
4.4.90.0000.03712.36
4.4.80.0030.03012.36
4.4.70.0030.02712.36
4.4.60.0000.03312.36
4.4.50.0000.02312.36
4.4.40.0000.04012.36
4.4.30.0000.02712.36
4.4.20.0000.03012.36
4.4.10.0030.02312.36
4.4.00.0030.03712.36
4.3.110.0000.01712.36
4.3.100.0030.01312.36
4.3.90.0000.02312.36
4.3.80.0000.02712.36
4.3.70.0000.01712.36
4.3.60.0000.02012.36
4.3.50.0030.02712.36
4.3.40.0000.04312.36
4.3.30.0070.02012.36
4.3.20.0000.04012.36
4.3.10.0000.03312.36
4.3.00.0030.03312.36

preferences:
51.32 ms | 400 KiB | 5 Q