3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 12; $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'; { $chars_length = (strlen($chars) - 1); $string = $chars{rand(0, $chars_length)}; for ($i = 1; $i < $length; $i = strlen($string)) { $r = $chars{rand(0, $chars_length)}; if ($r != $string{$i - 1}) { $string .= $r; } } echo $string; }

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)
7.4.00.0160.00015.21
7.3.120.0070.01114.68
7.3.110.0050.01114.79
7.3.100.0120.00514.55
7.3.90.0050.01014.91
7.3.80.0090.00514.65
7.3.70.0080.00714.73
7.3.60.0030.01114.74
7.3.50.0060.01014.76
7.3.40.0030.01214.60
7.3.30.0060.00914.93
7.3.20.0050.01116.62
7.3.10.0080.00916.61
7.3.00.0090.00616.79
7.2.250.0080.01114.95
7.2.240.0080.00815.04
7.2.230.0050.01114.86
7.2.220.0030.01115.04
7.2.210.0020.01415.03
7.2.200.0090.00814.98
7.2.190.0060.00815.04
7.2.180.0030.00914.94
7.2.170.0070.00814.97
7.2.160.0050.00915.15
7.2.150.0050.00717.01
7.2.140.0090.00516.98
7.2.130.0050.00916.88
7.2.120.0040.01016.94
7.2.110.0070.00716.75
7.2.100.0050.01016.76
7.2.90.0070.00816.81
7.2.80.0050.01016.82
7.2.70.0100.00317.01
7.2.60.0020.01316.99
7.2.50.0090.00716.94
7.2.40.0080.00716.99
7.2.30.0080.00616.93
7.2.20.0030.01316.86
7.2.10.0050.00916.88
7.2.00.0060.00817.54
7.1.330.0030.01415.83
7.1.320.0050.01016.04
7.1.310.0020.01215.73
7.1.300.0060.01115.88
7.1.290.0050.01015.65
7.1.280.0050.01015.78
7.1.270.0050.01115.82
7.1.260.0070.00515.81
7.1.250.0060.00715.72
7.1.240.0030.00915.99
7.1.230.0030.01215.86
7.1.220.0000.01515.84
7.1.210.0040.00715.93
7.1.200.0040.01115.83
7.1.190.0030.00715.64
7.1.180.0000.01515.98
7.1.170.0030.01015.66
7.1.160.0110.00315.94
7.1.150.0030.01415.73
7.1.140.0100.00315.73
7.1.130.0090.00615.76
7.1.120.0110.00315.81
7.1.110.0090.00015.74
7.1.100.0000.01415.66
7.1.90.0030.01015.74
7.1.80.0070.00715.92
7.1.70.0070.00716.40
7.1.60.0080.00817.65
7.1.50.0020.01516.39
7.1.40.0070.00715.84
7.1.30.0000.01315.56
7.1.20.0100.00315.83
7.1.10.0000.01315.69
7.1.00.0040.04418.96
7.0.330.0040.00415.11
7.0.320.0040.00715.37
7.0.310.0110.00415.25
7.0.300.0030.01315.49
7.0.290.0080.00615.51
7.0.280.0040.01115.33
7.0.270.0090.00315.65
7.0.260.0060.01015.43
7.0.250.0030.01015.29
7.0.240.0060.00615.26
7.0.230.0090.00615.62
7.0.220.0030.01015.22
7.0.210.0060.00615.37
7.0.200.0060.00516.12
7.0.190.0070.00715.36
7.0.180.0030.01015.55
7.0.170.0090.00615.43
7.0.160.0060.00615.62
7.0.150.0040.00815.34
7.0.140.0020.04418.72
7.0.130.0000.01315.60
7.0.120.0080.00015.29
7.0.110.0140.00315.43
7.0.100.0060.00915.34
7.0.90.0030.00715.45
7.0.80.0070.00715.56
7.0.70.0000.01515.41
7.0.60.0040.04417.68
7.0.50.0120.04016.79
7.0.40.0100.02016.69
7.0.30.0100.02516.91
7.0.20.0150.02316.79
7.0.10.0070.03316.97
7.0.00.0130.04316.74
5.6.400.0070.01014.47
5.6.390.0040.01114.36
5.6.380.0070.00714.14
5.6.370.0120.00014.28
5.6.360.0090.00614.72
5.6.350.0030.01414.66
5.6.340.0090.00014.23
5.6.330.0060.00614.25
5.6.320.0000.01414.64
5.6.310.0080.00814.31
5.6.300.0090.00614.61
5.6.290.0030.01014.46
5.6.280.0020.04317.77
5.6.270.0000.01414.28
5.6.260.0060.00314.40
5.6.250.0030.00614.61
5.6.240.0100.00014.24
5.6.230.0030.01414.35
5.6.220.0000.01314.33
5.6.210.0080.04017.60
5.6.200.0040.04016.33
5.6.190.0030.04317.59
5.6.180.1870.02417.53
5.6.170.0180.04017.36
5.6.160.0070.02117.59
5.6.150.0050.03816.22
5.6.140.0020.03916.33
5.6.130.0020.05016.26
5.6.120.0090.02117.72
5.6.110.0100.04017.78
5.6.100.0050.04017.54
5.6.90.0050.04117.74
5.6.80.0050.04317.17
5.6.70.2220.02017.31
5.6.60.0100.00714.67
5.6.50.0120.00013.93
5.6.40.0030.00714.38
5.6.30.0030.01014.23
5.6.20.0070.00714.28
5.6.10.0070.00714.18
5.6.00.0000.01114.62
5.5.380.0120.00014.27
5.5.370.0070.00714.31
5.5.360.0060.00614.19
5.5.350.0150.04017.38
5.5.340.0090.03316.18
5.5.330.0090.02017.09
5.5.320.0270.04017.14
5.5.310.0180.04317.13
5.5.300.0050.04816.07
5.5.290.0050.04516.15
5.5.280.0050.02517.54
5.5.270.0070.02817.64
5.5.260.0080.02217.58
5.5.250.0020.03017.50
5.5.240.0120.04117.34
5.5.230.0000.01514.33
5.5.220.0000.01414.41
5.5.210.0100.00314.10
5.5.200.0130.00314.37
5.5.190.0060.00314.01
5.5.180.0090.00614.34
5.5.170.0060.00614.39
5.5.160.0030.01414.44
5.5.150.0050.00514.25
5.5.140.0070.01014.46
5.5.130.0040.01114.35
5.5.120.0100.00313.89
5.5.110.0100.00714.28
5.5.100.0040.00814.14
5.5.90.0030.00714.44
5.5.80.0040.01113.93
5.5.70.0100.00414.12
5.5.60.0110.00014.08
5.5.50.0080.00613.81
5.5.40.0070.00714.44
5.5.30.0000.01014.14
5.5.20.0060.00614.37
5.5.10.0040.01113.98
5.5.00.0060.00914.27
5.4.450.0070.03315.71
5.4.440.0180.03315.59
5.4.430.0200.03415.70
5.4.420.0050.03715.63
5.4.410.0180.03315.64
5.4.400.0080.03315.36
5.4.390.0100.02615.28
5.4.380.0120.03415.34
5.4.370.0090.03015.19
5.4.360.0080.03215.35
5.4.350.0130.02815.31
5.4.340.0080.03215.35
5.4.330.0050.00511.94
5.4.320.0080.02312.20
5.4.310.0010.02512.20
5.4.300.0040.02212.20
5.4.290.0080.02112.20
5.4.280.0060.02612.15
5.4.270.0170.03215.47
5.4.260.0070.03015.41
5.4.250.0050.04115.46
5.4.240.0050.04315.44
5.4.230.0100.03315.47
5.4.220.0100.04015.44
5.4.210.0100.03115.46
5.4.200.0100.03215.41
5.4.190.0050.03815.45
5.4.180.0050.03715.42
5.4.170.0120.03815.46
5.4.160.0100.02515.48
5.4.150.0100.02715.42
5.4.140.0120.03114.24
5.4.130.0070.03514.25
5.4.120.0080.02814.10
5.4.110.0020.03214.21
5.4.100.0040.03214.26
5.4.90.0100.02814.27
5.4.80.0080.03014.22
5.4.70.0080.03814.16
5.4.60.0050.02814.27
5.4.50.0160.02314.13
5.4.40.0110.02814.26
5.4.30.0090.03514.21
5.4.20.0100.02514.21
5.4.10.0070.03314.15
5.4.00.0160.02514.03
5.3.290.0070.02612.37
5.3.280.0060.03313.34
5.3.270.0030.04713.34
5.3.260.0030.04013.37
5.3.250.0020.03513.24
5.3.240.0050.03213.27
5.3.230.0090.03113.35
5.3.220.0070.03513.22
5.3.210.0040.03513.31
5.3.200.0070.03713.25
5.3.190.0030.04113.33
5.3.180.0100.03413.24
5.3.170.0060.04513.28
5.3.160.0130.03313.24
5.3.150.0100.03713.34
5.3.140.0080.02513.24
5.3.130.0100.03813.33
5.3.120.0130.03013.30
5.3.110.0110.04013.22
5.3.100.0100.02513.01
5.3.90.0080.03413.06
5.3.80.0130.02712.97
5.3.70.0100.02513.02
5.3.60.0080.03213.07
5.3.50.0020.03213.01
5.3.40.0110.02213.03
5.3.30.0070.02713.00
5.3.20.0070.03512.86
5.3.10.0070.03012.84
5.3.00.0030.03112.81
5.2.170.0070.04311.37
5.2.160.0130.03711.36
5.2.150.0100.05311.34
5.2.140.0130.03711.37
5.2.130.0100.05011.30
5.2.120.0070.04011.30
5.2.110.0070.04711.22
5.2.100.0030.04711.24
5.2.90.0170.05011.31
5.2.80.0070.04311.14
5.2.70.0070.04711.02
5.2.60.0030.04711.26
5.2.50.0030.04311.14
5.2.40.0000.05011.04
5.2.30.0070.06011.11
5.2.20.0070.05711.19
5.2.10.0100.04711.14
5.2.00.0070.04310.77
5.1.60.0100.03310.17
5.1.50.0070.03710.17
5.1.40.0170.03710.17
5.1.30.0030.04710.32
5.1.20.0100.05010.48
5.1.10.0070.03710.29
5.1.00.0170.04010.17
5.0.50.0070.03310.17
5.0.40.0030.04310.17
5.0.30.0070.04010.17
5.0.20.0130.02710.17
5.0.10.0030.04310.17
5.0.00.0030.05310.17
4.4.90.0070.02710.17
4.4.80.0000.03310.17
4.4.70.0030.02710.17
4.4.60.0030.02010.17
4.4.50.0070.02710.17
4.4.40.0070.04010.17
4.4.30.0030.02710.17
4.4.20.0100.02010.17
4.4.10.0070.02010.17
4.4.00.0000.05010.17
4.3.110.0000.02710.17
4.3.100.0130.01310.17
4.3.90.0000.02710.17
4.3.80.0070.04310.17
4.3.70.0070.02310.17
4.3.60.0000.02710.17
4.3.50.0070.02010.17
4.3.40.0030.04310.17
4.3.30.0030.02710.17
4.3.20.0000.03310.17
4.3.10.0100.02010.17
4.3.00.0070.0237.46

preferences:
36.1 ms | 401 KiB | 5 Q