3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Create an array and push on the names // of your closest family and friends $name = array(); array_push($name,"Mike"); array_push($name,"Jane"); array_push($name,"Jack"); array_push($name,"Nike"); array_push($name,"Ash"); array_push($name,"Chris"); array_push($name,"Zark"); // Sort the list sort($name); join(",",$name); // Randomly select a winner! $random = count($name,rand(0,7)); // Print the winner's name in ALL CAPS $winner = strtoupper($name[array_rand($name)]); print($winner); ?>

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.10.0040.01114.97
7.4.00.0030.01415.09
7.3.130.0030.01615.13
7.3.120.0080.00814.68
7.3.110.0070.00914.84
7.3.100.0060.00814.44
7.3.90.0090.00314.73
7.3.80.0090.00214.81
7.3.70.0030.01114.78
7.3.60.0070.00714.90
7.3.50.0060.00914.77
7.3.40.0040.01114.84
7.3.30.0100.00314.63
7.3.20.0090.00516.72
7.3.10.0060.00916.46
7.3.00.0080.00616.51
7.2.260.0120.00614.70
7.2.250.0090.00915.27
7.2.240.0050.01015.09
7.2.230.0080.00814.95
7.2.220.0090.00614.86
7.2.210.0030.00915.06
7.2.200.0060.00715.07
7.2.190.0070.00815.16
7.2.180.0030.01214.94
7.2.170.0080.00614.84
7.2.160.0050.00715.04
7.2.150.0070.01016.58
7.2.140.0060.00716.93
7.2.130.0050.00916.67
7.2.120.0070.00816.67
7.2.110.0070.00416.90
7.2.100.0020.01016.75
7.2.90.0040.00917.03
7.2.80.0070.00616.92
7.2.70.0030.00916.72
7.2.60.0040.00716.69
7.2.50.0120.00316.98
7.2.40.0060.01116.71
7.2.30.0080.00816.83
7.2.20.0040.00816.88
7.2.10.0060.00616.76
7.2.00.0080.00617.75
7.1.330.0090.00515.76
7.1.320.0030.00815.70
7.1.310.0040.00915.77
7.1.300.0060.00515.79
7.1.290.0080.00715.80
7.1.280.0020.01115.82
7.1.270.0080.00515.69
7.1.260.0100.00215.71
7.1.250.0050.00815.75
7.1.240.0070.00716.02
7.1.230.0030.01015.82
7.1.220.0030.01515.86
7.1.210.0070.00715.78
7.1.200.0080.00615.41
7.1.190.0070.01015.71
7.1.180.0000.01315.86
7.1.170.0030.01415.76
7.1.160.0040.01415.81
7.1.150.0030.00915.98
7.1.140.0030.01015.81
7.1.130.0030.01015.73
7.1.120.0090.00615.84
7.1.110.0000.00915.71
7.1.100.0130.00015.57
7.1.90.0060.00315.79
7.1.80.0100.00315.84
7.1.70.0020.00816.52
7.1.60.0080.01117.42
7.1.50.0080.00916.12
7.1.40.0000.01015.57
7.1.30.0070.00715.91
7.1.20.0060.00616.04
7.1.10.0090.00315.73
7.1.00.0060.04018.93
7.0.330.0110.00415.25
7.0.320.0050.00415.32
7.0.310.0040.00815.21
7.0.300.0070.01015.41
7.0.290.0060.00615.15
7.0.280.0100.00315.39
7.0.270.0030.00615.40
7.0.260.0030.01015.43
7.0.250.0070.00715.35
7.0.240.0030.01015.37
7.0.230.0100.00315.16
7.0.220.0110.00315.25
7.0.210.0080.00415.54
7.0.200.0030.00716.02
7.0.190.0060.00615.50
7.0.180.0030.01015.43
7.0.170.0000.01315.23
7.0.160.0100.00315.07
7.0.150.0030.01015.22
7.0.140.0050.04218.87
7.0.130.0070.00715.34
7.0.120.0080.00315.12
7.0.110.0070.00315.29
7.0.100.0090.00315.10
7.0.90.0030.00615.38
7.0.80.0060.00915.32
7.0.70.0030.00915.27
7.0.60.0070.02217.54
7.0.50.0060.02016.54
7.0.40.0030.05016.83
7.0.30.0160.02816.74
7.0.20.0080.03216.80
7.0.10.0030.04116.79
7.0.00.0050.04816.69
5.6.400.0000.01014.38
5.6.390.0030.01014.53
5.6.380.0070.00714.41
5.6.370.0060.00614.58
5.6.360.0070.01014.36
5.6.350.0070.00714.26
5.6.340.0030.01314.58
5.6.330.0070.00314.29
5.6.320.0060.00914.47
5.6.310.0030.00714.38
5.6.300.0030.00714.29
5.6.290.0060.01214.21
5.6.280.0120.03517.80
5.6.270.0040.00714.39
5.6.260.0040.01014.18
5.6.250.0040.00414.41
5.6.240.0110.00414.56
5.6.230.0000.01113.93
5.6.220.0030.00714.26
5.6.210.0100.04417.39
5.6.200.0070.04416.14
5.6.190.0030.02517.43
5.6.180.2130.02017.49
5.6.170.0120.03917.31
5.6.160.0080.04117.33
5.6.150.0150.04016.17
5.6.140.0030.04916.22
5.6.130.0070.04316.23
5.6.120.0090.02117.68
5.6.110.0070.04617.74
5.6.100.0050.04617.55
5.6.90.0100.04217.57
5.6.80.0050.02317.49
5.6.70.2190.02017.24
5.6.60.0030.01314.02
5.6.50.0030.01314.11
5.6.40.0000.01114.28
5.6.30.0080.00614.32
5.6.20.0030.01214.42
5.6.10.0040.01114.24
5.6.00.0070.00714.29
5.5.380.0070.00714.32
5.5.370.0030.00614.15
5.5.360.0070.00714.38
5.5.350.0120.04317.40
5.5.340.0050.02516.19
5.5.330.0040.02717.21
5.5.320.0210.02817.09
5.5.310.0150.04317.29
5.5.300.0100.03516.08
5.5.290.0090.02016.10
5.5.280.0030.05017.36
5.5.270.0070.02417.43
5.5.260.0070.04917.41
5.5.250.0130.03717.38
5.5.240.0080.04517.34
5.5.230.0050.00514.20
5.5.220.0070.00714.22
5.5.210.0110.00314.29
5.5.200.0060.00614.35
5.5.190.0090.00014.24
5.5.180.0030.01013.98
5.5.170.0090.00614.26
5.5.160.0080.00014.16
5.5.150.0110.00414.39
5.5.140.0040.01114.20
5.5.130.0090.00614.39
5.5.120.0040.00814.29
5.5.110.0000.01113.86
5.5.100.0040.00714.00
5.5.90.0090.00614.05
5.5.80.0000.01014.29
5.5.70.0090.00314.27
5.5.60.0060.00614.39
5.5.50.0070.00614.13
5.5.40.0090.00614.13
5.5.30.0030.01014.05
5.5.20.0040.01114.33
5.5.10.0070.00714.24
5.5.00.0080.00014.26
5.4.450.2120.03015.11
5.4.440.0020.02515.10
5.4.430.0620.02715.24
5.4.420.1320.02015.30
5.4.410.1750.02215.17
5.4.400.1800.02115.04
5.4.390.2080.02014.99
5.4.380.1990.02115.08
5.4.370.2320.02414.93
5.4.360.2170.02214.94
5.4.350.2350.02114.91
5.4.340.2240.02314.71
5.4.330.0030.00610.78
5.4.320.2760.01514.97
5.4.310.2310.02115.02
5.4.300.2150.01815.07
5.4.290.2000.02114.96
5.4.280.2200.02315.06
5.4.270.2030.01914.96
5.4.260.2250.02315.03
5.4.250.2010.02415.11
5.4.240.1980.03215.12
5.4.230.1450.02015.00
5.4.220.1770.02315.04
5.4.210.1990.02515.00
5.4.200.1950.02314.89
5.4.190.2000.01815.07
5.4.180.1730.02115.02
5.4.170.1650.02215.01
5.4.160.2150.02315.03
5.4.150.2120.02214.84
5.4.140.2110.02313.45
5.4.130.1980.01813.71
5.4.120.1950.02813.57
5.4.110.1980.02213.64
5.4.100.2030.02013.61
5.4.90.2270.01813.45
5.4.80.2300.01813.63
5.4.70.1730.01313.76
5.4.60.0370.02813.60
5.4.50.0680.01813.68
5.4.40.2170.01713.61
5.4.30.1880.02013.55
5.4.20.2130.02213.77
5.4.10.2280.01813.69
5.4.00.2080.02213.34
5.3.290.4630.03714.54
5.3.280.3900.04314.55
5.3.270.3500.04014.55
5.3.260.3900.04014.50
5.3.250.4100.04014.50
5.3.240.3830.03714.53
5.3.230.3870.04014.54
5.3.220.3870.03714.49
5.3.210.3600.04014.54
5.3.200.4030.03714.50
5.3.190.4500.04014.53
5.3.180.3830.03714.49
5.3.170.3900.04014.44
5.3.160.0070.03314.51
5.3.150.0100.07014.35
5.3.140.3700.03314.43
5.3.130.3670.04014.47
5.3.120.3100.03714.50
5.3.110.4570.03714.52
5.3.100.4870.04713.95
5.3.90.3970.03313.95
5.3.80.4000.03313.96
5.3.70.3700.04714.04
5.3.60.4000.03013.93
5.3.50.4100.03713.87
5.3.40.3000.03014.04
5.3.30.1270.03013.84
5.3.20.0070.03013.51
5.3.10.3630.03713.60
5.3.00.3700.03313.56
5.2.170.3200.03311.08
5.2.160.3670.03711.08
5.2.150.2970.03011.00
5.2.140.0000.03011.10
5.2.130.0000.03011.04
5.2.120.1430.03311.09
5.2.110.3100.02311.19
5.2.100.2930.03311.03
5.2.90.1900.02711.07
5.2.80.3100.03011.10
5.2.70.3270.02711.05
5.2.60.3130.03010.97
5.2.50.3000.03310.95
5.2.40.2530.02310.96
5.2.30.2470.02710.96
5.2.20.2470.02710.89
5.2.10.2700.02710.74
5.2.00.2700.03010.72
5.1.60.2470.0209.96
5.1.50.2470.02010.01
5.1.40.2370.0279.98
5.1.30.2100.03010.36
5.1.20.2470.02310.39
5.1.10.2670.02010.08
5.1.00.2330.02310.09
5.0.50.0570.0278.60
5.0.40.1500.0238.43
5.0.30.1070.0308.06
5.0.20.1430.0208.23
5.0.10.1370.0178.18
5.0.00.0700.0378.20
4.4.90.1430.0206.29
4.4.80.1230.0176.29
4.4.70.1230.0176.29
4.4.60.1270.0136.29
4.4.50.1570.0176.29
4.4.40.1200.0236.29
4.4.30.1270.0106.29
4.4.20.1430.0076.29
4.4.10.1100.0176.29
4.4.00.1670.0306.29
4.3.110.1400.0176.29
4.3.100.1500.0206.29
4.3.90.1430.0136.29
4.3.80.1800.0276.29
4.3.70.1500.0176.29
4.3.60.1570.0136.29
4.3.50.1570.0136.29
4.3.40.1500.0236.29
4.3.30.0570.0276.29
4.3.20.0830.0136.29
4.3.10.0730.0176.29
4.3.00.0770.0136.29

preferences:
29.91 ms | 401 KiB | 5 Q