3v4l.org

run code in 300+ PHP versions simultaneously
<?php function multiID($n=32) { for ($x=$s=0,$r=null; $x<$n; $x++) { $c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890'; if (($x<$n) && ($x > 0) && ($s < 2)) { $c .= "\002D_"; } $g = substr($c, mt_rand(0, strlen($c) - 1), 1); $r .= $g; if (($g == '_') || ($g == "\002D")) { $s++; } } return $r; } echo multiID(111);

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.0040.01414.94
7.3.120.0100.00714.64
7.3.110.0100.00714.90
7.3.100.0040.00814.76
7.3.90.0030.00914.70
7.3.80.0030.00614.90
7.3.70.0050.00914.81
7.3.60.0020.01114.71
7.3.50.0030.01214.82
7.3.40.0050.00814.88
7.3.30.0030.01014.73
7.3.20.0070.00716.61
7.3.10.0030.01216.75
7.3.00.0090.00516.55
7.2.250.0060.01214.96
7.2.240.0100.00815.04
7.2.230.0080.00815.04
7.2.220.0070.00514.97
7.2.210.0020.01315.00
7.2.200.0080.00815.09
7.2.190.0090.00515.12
7.2.180.0020.01215.02
7.2.170.0040.01315.04
7.2.00.0060.00919.43
7.1.330.0080.00615.81
7.1.320.0070.00715.95
7.1.310.0050.01015.93
7.1.300.0070.01015.66
7.1.290.0090.00415.87
7.1.280.0080.00615.73
7.1.270.0060.00615.71
7.1.260.0050.00615.81
7.1.70.0100.00717.34
7.1.60.0040.00717.05
7.1.50.0190.00617.08
7.1.00.0070.06722.46
7.0.200.0040.01116.79
7.0.140.0100.07022.09
7.0.60.0070.07719.94
7.0.50.0070.08017.84
7.0.40.0100.08020.30
7.0.30.0270.04020.21
7.0.20.0370.07720.05
7.0.10.0070.07720.10
7.0.00.0130.07720.22
5.6.280.0070.09021.13
5.6.210.0130.07320.48
5.6.200.0170.03718.18
5.6.190.0100.05020.50
5.6.180.0230.05720.54
5.6.170.0170.07020.44
5.6.160.0100.08020.39
5.6.150.0130.07318.16
5.6.140.0070.08018.17
5.6.130.0100.06718.24
5.6.120.0070.04321.14
5.6.110.0130.07721.02
5.6.100.0130.05721.09
5.6.90.0100.05321.01
5.6.80.0030.04320.51
5.6.70.4430.03320.40
5.5.350.0030.08320.39
5.5.340.0100.05018.07
5.5.330.0070.04020.40
5.5.320.0400.07720.32
5.5.310.0170.05020.34
5.5.300.0070.05018.00
5.5.290.0100.05317.94
5.5.280.0130.07320.88
5.5.270.0070.05720.76
5.5.260.0070.08720.87
5.5.250.0070.07020.58
5.5.240.0200.07720.27
5.4.450.0470.05719.45
5.4.440.0600.05719.67
5.4.430.0870.06019.46
5.4.420.0100.05719.57
5.4.410.0270.05018.91
5.4.400.0470.05318.81
5.4.390.0430.06318.77
5.4.380.0270.05018.79
5.4.370.0200.04718.79
5.4.360.0230.05718.67
5.4.350.0050.03912.02
5.4.340.0070.03512.01
5.4.320.0080.05712.50
5.4.310.0040.03912.50
5.4.300.0060.03612.51
5.4.290.0060.03712.50
5.4.280.0050.03512.39
5.4.270.0050.03712.40
5.4.260.0060.04312.40
5.4.250.0100.07718.95
5.4.240.0000.06019.01
5.4.230.0200.06718.95
5.4.220.0100.05018.86
5.4.210.0070.05318.95
5.4.200.0070.05018.70
5.4.190.0030.05318.92
5.4.180.0100.05018.67
5.4.170.0030.06018.94
5.4.160.0070.05318.73
5.4.150.0130.05018.84
5.4.140.0130.06316.55
5.4.130.0100.04716.52
5.4.120.0100.07316.39
5.4.110.0100.04716.44
5.4.100.0070.04716.35
5.4.90.0070.05316.50
5.4.80.0100.04716.29
5.4.70.0070.05016.43
5.4.60.0070.05016.43
5.4.50.0070.05016.26
5.4.40.0130.04316.37
5.4.30.0070.05716.50
5.4.20.0030.07016.37
5.4.10.0100.06716.30
5.4.00.0000.06315.95
5.3.290.0070.05012.80
5.3.280.0100.04714.63
5.3.270.0070.05314.82
5.3.260.0130.05014.61
5.3.250.0070.05014.66
5.3.240.0100.04714.69
5.3.230.0100.05014.82
5.3.220.0070.07714.70
5.3.210.0000.06314.65
5.3.200.0070.05314.79
5.3.190.0030.05714.39
5.3.180.0170.04314.73
5.3.170.0200.04314.65
5.3.160.0100.05014.53
5.3.150.0100.05014.39
5.3.140.0100.06014.52
5.3.130.0070.05714.71
5.3.120.0100.06014.63
5.3.110.0100.06014.61
5.3.100.0070.05014.17
5.3.90.0070.05014.20
5.3.80.0030.05014.01
5.3.70.0130.04314.10
5.3.60.0030.05314.08
5.3.50.0100.04714.16
5.3.40.0000.05314.02
5.3.30.0030.05013.91
5.3.20.0030.05013.53
5.3.10.0070.05013.66
5.3.00.0170.04013.66
5.2.170.0070.04011.36
5.2.160.0070.03711.23
5.2.150.0030.04311.11
5.2.140.0070.04011.29
5.2.130.0100.05011.25
5.2.120.0100.03311.27
5.2.110.0030.04011.16
5.2.100.0030.05711.27
5.2.90.0070.03711.14
5.2.80.0170.03311.26
5.2.70.0000.04311.18
5.2.60.0170.03711.05
5.2.50.0100.03310.99
5.2.40.0030.04011.07
5.2.30.0100.03710.88
5.2.20.0030.04011.04
5.2.10.0030.04010.93
5.2.00.0030.04010.80
5.1.60.0030.03310.09
5.1.50.0000.0409.92
5.1.40.0000.03710.13
5.1.30.0070.03310.40
5.1.20.0030.03710.43
5.1.10.0070.03310.14
5.1.00.0030.03710.26
5.0.50.0070.0278.39
5.0.40.0030.0278.57
5.0.30.0030.0638.29
5.0.20.0000.0308.30
5.0.10.0000.0308.23
5.0.00.0030.0408.22
4.4.90.0030.0206.44
4.4.80.0030.0206.44
4.4.70.0000.0276.95
4.4.60.0000.0236.95
4.4.50.0000.0236.95
4.4.40.0030.0336.95
4.4.30.0030.0206.95
4.4.20.0030.0206.95
4.4.10.0030.0236.95
4.4.00.0170.0276.95
4.3.110.0030.0206.95
4.3.100.0000.0236.95
4.3.90.0030.0206.95
4.3.80.0100.0276.95
4.3.70.0070.0236.95
4.3.60.0000.0236.95
4.3.50.0030.0206.95
4.3.40.0030.0336.95
4.3.30.0000.0236.95
4.3.20.0070.0206.95
4.3.10.0000.0306.95
4.3.00.0100.0276.87

preferences:
34.51 ms | 401 KiB | 5 Q