3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sum = 0; $master = array(); $arrColors = array('R', 'B', 'G' ,'Y'); $arrNumbers = array('1', '2', '3', '4'); foreach($arrNumbers as $num) { foreach($arrColors as $colorK => $colorV) { $temp = $colorV.' - '.$num; // if ($num != $num[$colorK]) { // $sum += $num; //} //array_push($master, $temp); } } print_r($master); echo "\n"; print_r ("The sum is ".$sum);

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.39
8.3.50.0070.01121.98
8.3.40.0090.00618.69
8.3.30.0100.00319.14
8.3.20.0040.00420.21
8.3.10.0160.00320.48
8.3.00.0040.00419.26
8.2.180.0110.00718.14
8.2.170.0070.01122.96
8.2.160.0100.00320.44
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0070.00022.06
8.2.110.0080.00319.14
8.2.100.0080.00317.91
8.2.90.0040.00417.75
8.2.80.0090.00017.97
8.2.70.0030.00617.50
8.2.60.0060.00317.92
8.2.50.0040.00718.07
8.2.40.0060.00318.16
8.2.30.0000.00818.05
8.2.20.0000.00717.77
8.2.10.0050.00218.05
8.2.00.0040.00417.75
8.1.280.0140.00725.92
8.1.270.0080.00023.93
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.66
8.1.230.0030.00820.84
8.1.220.0050.00317.74
8.1.210.0030.00618.97
8.1.200.0000.00917.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0040.00422.05
8.1.150.0070.00018.95
8.1.140.0000.00817.50
8.1.130.0030.00317.82
8.1.120.0030.00317.39
8.1.110.0040.00417.50
8.1.100.0000.00817.38
8.1.90.0000.00717.36
8.1.80.0040.00417.44
8.1.70.0000.00717.46
8.1.60.0000.00917.41
8.1.50.0040.00417.55
8.1.40.0030.00617.53
8.1.30.0050.00317.61
8.1.20.0040.00417.70
8.1.10.0050.00217.55
8.1.00.0050.00317.41
8.0.300.0000.00719.86
8.0.290.0000.00716.75
8.0.280.0000.00718.31
8.0.270.0030.00317.21
8.0.260.0000.00817.18
8.0.250.0070.00016.97
8.0.240.0000.00716.99
8.0.230.0000.00716.95
8.0.220.0030.00316.79
8.0.210.0000.00716.90
8.0.200.0000.00616.97
8.0.190.0080.00016.93
8.0.180.0070.00016.89
8.0.170.0080.00016.93
8.0.160.0030.00316.81
8.0.150.0040.00416.73
8.0.140.0080.00016.82
8.0.130.0000.00613.35
8.0.120.0080.00016.76
8.0.110.0000.00716.92
8.0.100.0080.00016.85
8.0.90.0000.00816.88
8.0.80.0090.00616.89
8.0.70.0050.00316.76
8.0.60.0000.00716.78
8.0.50.0000.00716.92
8.0.30.0090.01017.14
8.0.20.0070.01217.40
8.0.10.0070.00016.91
8.0.00.0080.00916.68
7.4.330.0020.00215.07
7.4.320.0000.00716.51
7.4.300.0060.00016.50
7.4.290.0020.00516.51
7.4.280.0090.00016.63
7.4.270.0070.00016.49
7.4.260.0030.00316.41
7.4.250.0070.00016.55
7.4.240.0020.00516.54
7.4.230.0000.00716.42
7.4.220.0090.00916.56
7.4.210.0060.01016.59
7.4.200.0000.00716.53
7.4.160.0120.00816.41
7.4.150.0090.01217.40
7.4.140.0070.01117.86
7.4.130.0100.01016.50
7.4.120.0110.00616.55
7.4.110.0050.01116.47
7.4.100.0060.01216.46
7.4.90.0130.00416.41
7.4.80.0100.01619.39
7.4.70.0100.00716.43
7.4.60.0090.00616.39
7.4.50.0060.00316.57
7.4.40.0070.01016.31
7.4.30.0090.01116.29
7.4.00.0070.00814.91
7.3.330.0050.00013.10
7.3.320.0000.00513.07
7.3.310.0000.00716.20
7.3.300.0000.00716.25
7.3.290.0130.00316.31
7.3.280.0060.01216.27
7.3.270.0120.00617.40
7.3.260.0070.01116.25
7.3.250.0100.00816.34
7.3.240.0090.00616.40
7.3.230.0060.01016.39
7.3.210.0060.01116.32
7.3.200.0030.01519.39
7.3.190.0060.01516.36
7.3.180.0090.00616.46
7.3.170.0130.00316.27
7.3.160.0070.01016.55
7.3.120.0040.01314.77
7.3.110.0090.00914.85
7.3.100.0100.00715.11
7.3.90.0090.00914.88
7.3.80.0000.01414.86
7.3.70.0100.00314.62
7.3.60.0150.00015.00
7.3.50.0090.00914.80
7.3.40.0120.00014.94
7.3.30.0060.00614.85
7.3.20.0100.00616.75
7.3.10.0030.00716.39
7.3.00.0030.01016.61
7.2.330.0110.00616.51
7.2.320.0120.00616.54
7.2.310.0060.01216.43
7.2.300.0070.01016.64
7.2.290.0100.01316.36
7.2.250.0030.01215.20
7.2.240.0110.00715.12
7.2.230.0090.00614.91
7.2.220.0030.00914.96
7.2.210.0030.01614.95
7.2.200.0090.00615.04
7.2.190.0070.01015.07
7.2.180.0080.00314.88
7.2.170.0090.00615.04
7.2.00.0030.00919.51
7.1.330.0060.00915.67
7.1.320.0060.00915.39
7.1.310.0060.01015.81
7.1.300.0080.00415.85
7.1.290.0080.00015.90
7.1.280.0030.00615.76
7.1.270.0080.00015.73
7.1.260.0000.01515.95
7.1.100.0110.00018.27
7.1.70.0080.00416.73
7.1.60.0030.01919.32
7.1.50.0160.00516.63
7.1.00.0070.07322.45
7.0.200.0040.01116.73
7.0.140.0030.07022.00
7.0.70.4770.04019.88
7.0.60.0200.06719.95
7.0.50.0000.04717.80
7.0.40.0130.04020.05
7.0.30.0300.07720.32
7.0.20.0330.07020.19
7.0.10.0230.05719.99
7.0.00.0070.03720.11
5.6.280.0000.07721.02
5.6.210.0200.07020.53
5.6.200.0070.08018.22
5.6.190.0030.05320.60
5.6.180.0170.04720.65
5.6.170.0370.07020.62
5.6.160.0130.05020.33
5.6.150.0070.05318.22
5.6.140.0100.08018.18
5.6.130.0200.03718.18
5.6.120.0100.08021.14
5.6.110.0070.07721.11
5.6.100.0100.07721.11
5.6.90.0230.07321.09
5.6.80.0000.04720.54
5.6.70.0130.07320.36
5.5.350.0000.08320.33
5.5.340.0100.06717.98
5.5.330.0100.03320.43
5.5.320.0030.07020.16
5.5.310.0370.05320.17
5.5.300.0130.07017.97
5.5.290.0070.08717.88
5.5.280.0200.04720.77
5.5.270.0070.04020.68
5.5.260.0070.08720.87
5.5.250.0070.08020.59
5.5.240.0100.07020.19
5.4.450.0200.05019.46
5.4.440.0270.05019.41
5.4.430.0200.05319.56
5.4.420.0230.05019.48
5.4.410.0170.06019.27
5.4.400.0200.04018.93
5.4.390.0230.03719.14
5.4.380.0200.04019.10
5.4.370.0330.06318.92
5.4.360.0370.06019.08
5.4.350.0330.04719.24
5.4.340.0270.03319.08
5.4.320.0430.05719.25
5.4.310.0330.07019.25
5.4.300.0200.04319.08
5.4.290.0330.07019.16
5.4.280.0270.03719.15
5.4.270.0300.05719.13
5.4.260.0200.07319.13
5.4.250.0270.04318.77
5.4.240.0300.07019.07
5.4.230.0270.04318.91
5.4.220.0300.08019.15
5.4.210.0270.07018.87
5.4.200.0300.07318.91
5.4.190.0300.04319.07
5.4.180.0230.07019.07
5.4.170.0230.05318.77
5.4.160.0270.07019.03
5.4.150.0230.04019.05
5.4.140.0230.03316.26
5.4.130.0270.05716.21
5.4.120.0270.03316.44
5.4.110.0230.03716.06
5.4.100.0370.05316.21
5.4.90.0300.05316.21
5.4.80.0230.03716.19
5.4.70.0230.03716.48
5.4.60.0330.06016.36
5.4.50.0270.04716.36
5.4.40.0230.07016.37
5.4.30.0170.04716.36
5.4.20.0330.06016.43
5.4.10.0230.07316.36
5.4.00.0230.06015.63
5.3.290.0170.04314.61
5.3.280.0270.03314.46
5.3.270.0300.05314.51
5.3.260.0300.03314.43
5.3.250.0200.04014.54
5.3.240.0170.04014.68
5.3.230.0330.04714.45
5.3.220.0270.03314.51
5.3.210.0200.06014.42
5.3.200.0330.06014.59
5.3.190.0230.05014.41
5.3.180.0200.04014.64
5.3.170.0370.05014.39
5.3.160.0230.03714.43
5.3.150.0300.05714.39
5.3.140.0200.05014.46
5.3.130.0270.06714.49
5.3.120.0270.05014.52
5.3.110.0400.05714.63
5.3.100.0270.06713.88
5.3.90.0130.04313.89
5.3.80.0170.03714.11
5.3.70.0270.04013.96
5.3.60.0300.03313.98
5.3.50.0200.04013.87
5.3.40.0230.03713.77
5.3.30.0230.07013.86
5.3.20.0230.05313.62
5.3.10.0330.06313.70
5.3.00.0270.05013.58
5.2.170.0400.04711.25
5.2.160.0270.03311.25
5.2.150.0270.03311.25
5.2.140.0230.03311.25
5.2.130.0200.06311.25
5.2.120.0170.06711.25
5.2.110.0230.05311.25
5.2.100.0300.03311.25
5.2.90.0300.05011.25
5.2.80.0270.05011.25
5.2.70.0330.05011.25
5.2.60.0230.06011.25
5.2.50.0270.03711.25
5.2.40.0230.03711.25
5.2.30.0130.03011.25
5.2.20.0170.04011.25
5.2.10.0230.04711.25
5.2.00.0170.04011.25
5.1.60.0270.04011.25
5.1.50.0170.05011.25
5.1.40.0230.04311.25
5.1.30.0230.04711.25
5.1.20.0130.03011.25
5.1.10.0170.04011.25
5.1.00.0170.03311.25
5.0.50.0130.02311.25
5.0.40.0170.01711.25
5.0.30.0130.06011.25
5.0.20.0200.02011.25
5.0.10.0130.03311.25
5.0.00.0100.04711.25
4.4.90.0100.01711.25
4.4.80.0100.03011.25
4.4.70.0100.02011.25
4.4.60.0070.03311.25
4.4.50.0130.03011.25
4.4.40.0100.05311.25
4.4.30.0200.02311.25
4.4.20.0070.03011.25
4.4.10.0100.01711.25
4.4.00.0070.03311.25
4.3.110.0030.04011.25
4.3.100.0100.03311.25
4.3.90.0100.01711.25
4.3.80.0100.02311.25
4.3.70.0070.03011.25
4.3.60.0100.03311.25
4.3.50.0100.02011.25
4.3.40.0170.02311.25
4.3.30.0070.03311.25
4.3.20.0070.03311.25
4.3.10.0030.03011.25
4.3.00.0030.02311.25

preferences:
48.44 ms | 401 KiB | 5 Q