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($arrColor as $color) { $temp = $color.' - '.$num; if ($num != $color) { $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.0170.00318.56
8.3.50.0190.00221.93
8.3.40.0150.00018.45
8.3.30.0120.00919.12
8.3.20.0070.00020.34
8.3.10.0070.00020.65
8.3.00.0030.00619.25
8.2.180.0150.00616.75
8.2.170.0070.00722.96
8.2.160.0070.00720.57
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00422.23
8.2.110.0060.00320.25
8.2.100.0110.00018.03
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0100.00017.50
8.2.60.0050.00518.04
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0000.00818.04
8.2.20.0040.00417.80
8.2.10.0040.00418.04
8.2.00.0000.00717.61
8.1.280.0120.00925.92
8.1.270.0090.00022.03
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00321.93
8.1.230.0030.00918.95
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0060.00617.25
8.1.190.0030.00617.22
8.1.180.0000.00718.10
8.1.170.0060.00318.50
8.1.160.0040.00422.05
8.1.150.0000.00718.93
8.1.140.0000.00717.51
8.1.130.0050.00317.88
8.1.120.0040.00417.46
8.1.110.0040.00417.34
8.1.100.0000.00817.35
8.1.90.0000.00717.39
8.1.80.0070.00017.38
8.1.70.0000.00717.46
8.1.60.0030.00617.50
8.1.50.0030.00517.42
8.1.40.0040.00417.55
8.1.30.0000.00817.66
8.1.20.0040.00417.67
8.1.10.0070.00017.39
8.1.00.0000.00717.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0040.00417.32
8.0.260.0030.00317.26
8.0.250.0070.00016.91
8.0.240.0000.00717.03
8.0.230.0000.00716.88
8.0.220.0000.00716.91
8.0.210.0040.00416.93
8.0.200.0030.00316.93
8.0.190.0040.00416.96
8.0.180.0070.00016.85
8.0.170.0030.00617.04
8.0.160.0040.00416.93
8.0.150.0050.00316.81
8.0.140.0000.00816.86
8.0.130.0000.00513.37
8.0.120.0040.00416.89
8.0.110.0000.00716.78
8.0.100.0000.00716.97
8.0.90.0040.00416.95
8.0.80.0040.01116.84
8.0.70.0050.00316.99
8.0.60.0050.00216.83
8.0.50.0080.00016.97
8.0.30.0180.00517.20
8.0.20.0080.01617.40
8.0.10.0070.00016.89
8.0.00.0100.00816.77
7.4.330.0000.00515.03
7.4.320.0000.00616.60
7.4.300.0030.00316.48
7.4.290.0000.00816.44
7.4.280.0040.00416.57
7.4.270.0030.00316.51
7.4.260.0040.00416.41
7.4.250.0060.00316.40
7.4.240.0050.00216.58
7.4.230.0040.00416.61
7.4.220.0150.00916.46
7.4.210.0090.01216.62
7.4.200.0000.00716.50
7.4.160.0160.00816.51
7.4.150.0060.01317.40
7.4.140.0050.01217.86
7.4.130.0110.01016.51
7.4.120.0130.00616.47
7.4.110.0100.00716.62
7.4.100.0100.01016.45
7.4.90.0150.00416.59
7.4.80.0130.01319.39
7.4.70.0120.00916.46
7.4.60.0110.00616.57
7.4.50.0000.00416.58
7.4.40.0060.00916.37
7.4.30.0090.01316.57
7.4.00.0070.01014.84
7.3.330.0030.00313.15
7.3.320.0050.00013.22
7.3.310.0030.00316.20
7.3.300.0000.00716.36
7.3.290.0080.00816.27
7.3.280.0080.00816.36
7.3.270.0110.00717.40
7.3.260.0140.00316.36
7.3.250.0090.01016.28
7.3.240.0080.00816.38
7.3.230.0080.00816.49
7.3.210.0100.01016.49
7.3.200.0060.01519.39
7.3.190.0160.00016.52
7.3.180.0040.01316.48
7.3.170.0060.00916.32
7.3.160.0000.01516.21
7.3.00.0060.00616.63
7.2.330.0130.00316.46
7.2.320.0070.01016.66
7.2.310.0060.01816.38
7.2.300.0110.00816.44
7.2.290.0100.01316.73
7.2.130.0080.00616.67
7.2.120.0100.00316.92
7.2.110.0070.00716.93
7.2.100.0030.00716.55
7.2.90.0000.00816.66
7.2.80.0070.00416.98
7.2.70.0060.00616.92
7.2.60.0000.00816.96
7.2.50.0060.00916.45
7.2.40.0060.00616.56
7.2.30.0100.00016.74
7.2.20.0030.01316.89
7.2.10.0000.01416.85
7.2.00.0040.00716.91
7.1.250.0000.00915.68
7.1.240.0070.00415.98
7.1.230.0110.00015.92
7.1.220.0100.00315.56
7.1.210.0000.01115.58
7.1.200.0070.00315.83
7.1.190.0000.00815.71
7.1.180.0000.01015.57
7.1.170.0040.00715.81
7.1.160.0050.00515.47
7.1.150.0000.01315.70
7.1.140.0060.00315.38
7.1.130.0060.00615.74
7.1.120.0030.01015.59
7.1.110.0070.00415.89
7.1.100.0050.00515.40
7.1.90.0060.00315.52
7.1.80.0040.00715.47
7.1.70.0060.00516.41
7.1.60.0070.01017.54
7.1.50.0020.01516.36
7.1.40.0080.00415.79
7.1.30.0040.00715.81
7.1.20.0090.00315.59
7.1.10.0000.01215.55
7.1.00.0070.03719.01
7.0.330.0050.00515.45
7.0.320.0090.00315.46
7.0.310.0060.00614.98
7.0.300.0040.00415.37
7.0.290.0070.00715.38
7.0.280.0030.00715.51
7.0.270.0000.00815.48
7.0.260.0030.00915.16
7.0.250.0070.00415.20
7.0.240.0040.01115.39
7.0.230.0030.00915.46
7.0.220.0060.00615.56
7.0.210.0100.00315.31
7.0.200.0020.01016.12
7.0.190.0040.00715.30
7.0.180.0040.00715.32
7.0.170.0080.00315.55
7.0.160.0070.00715.45
7.0.150.0030.00715.31
7.0.140.0020.04418.65
7.0.130.0100.00015.41
7.0.120.0000.01415.29
7.0.110.0030.00915.33
7.0.100.0080.00415.13
7.0.90.0060.00315.45
7.0.80.0100.00315.11
7.0.70.0030.00715.28
7.0.60.0010.04017.48
7.0.50.0070.02716.60
7.0.40.0100.03716.82
7.0.30.0250.04316.79
7.0.20.0170.04616.66
7.0.10.0110.04116.68
7.0.00.0030.04016.66
5.6.380.0070.00714.14
5.6.370.0030.00914.08
5.6.360.0070.00714.32
5.6.350.0100.00314.25
5.6.340.0030.00813.85
5.6.330.0100.00714.44
5.6.320.0040.00714.16
5.6.310.0090.00314.14
5.6.300.0050.00514.01
5.6.290.0100.00613.83
5.6.280.0020.04417.69
5.6.270.0060.00314.07
5.6.260.0030.00714.16
5.6.250.0040.00714.56
5.6.240.0030.00714.22
5.6.230.0100.00014.18
5.6.220.0030.00614.13
5.6.210.0060.04317.37
5.6.200.0020.02716.00
5.6.190.0060.02317.38
5.6.180.0230.02517.28
5.6.170.0220.02517.37
5.6.160.0020.04717.32
5.6.150.0050.04416.16
5.6.140.0050.02316.24
5.6.130.0060.04316.19
5.6.120.0100.01817.44
5.6.110.0090.03717.53
5.6.100.0070.03017.60
5.6.90.0070.02717.50
5.6.80.0080.04017.45
5.6.70.0040.01114.27
5.6.60.0060.00313.99
5.6.50.0000.01013.94
5.6.40.0070.00314.57
5.6.30.0040.00714.38
5.6.20.0100.00314.06
5.6.10.0070.00714.12
5.6.00.0030.00614.25
5.5.380.0030.00611.01
5.5.370.0080.00011.14
5.5.360.0070.00310.98
5.5.350.0140.03615.67
5.5.340.0080.02214.58
5.5.330.0040.02215.60
5.5.320.0230.03615.58
5.5.310.0130.02715.69
5.5.300.0010.04114.45
5.5.290.0060.04614.49
5.5.280.0030.02515.82
5.5.270.0070.03315.84
5.5.260.0050.03315.92
5.5.250.0050.02515.90
5.5.240.0150.03515.59
5.5.230.0030.00710.97
5.5.220.0030.00310.99
5.5.210.0030.00510.99
5.5.200.0030.00311.02
5.5.190.0000.00710.90
5.5.180.0020.00511.08
5.5.170.0040.00411.14
5.5.160.0000.00911.20
5.5.150.0030.00911.05
5.5.140.0040.00411.00
5.5.130.0050.00310.90
5.5.120.0000.00610.90
5.5.110.0000.01010.90
5.5.100.0000.00610.90
5.5.90.0050.00510.90
5.5.80.0000.00710.90
5.5.70.0090.00010.90
5.5.60.0030.00710.91
5.5.50.0030.00911.17
5.5.40.0000.01210.90
5.5.30.0030.00710.98
5.5.20.0040.00411.10
5.5.10.0070.00010.90
5.5.00.0040.00410.90
5.4.450.0020.02515.26
5.4.440.0540.02015.11
5.4.430.0270.01515.01
5.4.420.0350.00315.29
5.4.410.0330.00415.27
5.4.400.0350.00215.02
5.4.390.0330.00315.09
5.4.380.0330.00315.03
5.4.370.0330.00514.97
5.4.360.0320.00314.99
5.4.350.0390.00215.03
5.4.340.0400.00415.06
5.4.330.0000.00711.23
5.4.320.0080.02011.68
5.4.310.0050.02011.67
5.4.300.0090.01611.68
5.4.290.0040.02011.68
5.4.280.0040.02111.69
5.4.270.0050.01911.62
5.4.260.0050.02311.62
5.4.250.0030.02311.62
5.4.240.0060.01911.63
5.4.230.0060.02111.62
5.4.220.0040.02211.62
5.4.210.0020.02611.66
5.4.200.0050.02311.62
5.4.190.0040.02211.64
5.4.180.0050.02011.62
5.4.170.0030.02311.62
5.4.160.0050.02211.62
5.4.150.0040.02411.62
5.4.140.0050.02211.46
5.4.130.0050.02111.46
5.4.120.0050.02011.44
5.4.110.0020.02311.48
5.4.100.0060.01911.43
5.4.90.0070.01811.43
5.4.80.0040.02011.45
5.4.70.0020.02711.43
5.4.60.0040.01911.43
5.4.50.0020.02211.53
5.4.40.0020.02111.42
5.4.30.0050.01911.45
5.4.20.0040.01911.43
5.4.10.0050.02111.43
5.4.00.0020.02311.17
5.3.290.0050.02111.85
5.3.280.0050.02011.80
5.3.270.0070.02111.81
5.3.260.0050.02011.81
5.3.250.0090.01611.81
5.3.240.0050.02011.81
5.3.230.0040.02111.80
5.3.220.0020.02511.79
5.3.210.0040.02211.79
5.3.200.0060.01811.79
5.3.190.0060.02011.79
5.3.180.0030.02111.79
5.3.170.0040.02211.79
5.3.160.0030.02411.79
5.3.150.0040.02311.79
5.3.140.0070.01811.78
5.3.130.0020.02411.78
5.3.120.0040.02211.78
5.3.110.0040.02011.78
5.3.100.0050.02111.51
5.3.90.0060.01911.49
5.3.80.0020.02411.49
5.3.70.0090.01711.49
5.3.60.0020.02211.48
5.3.50.0040.02211.45
5.3.40.0040.02011.45
5.3.30.0050.02011.42
5.3.20.0060.01911.31
5.3.10.0050.01811.29
5.3.00.0070.01711.29
5.2.170.0040.01810.04
5.2.160.0050.01410.04
5.2.150.0060.01510.04
5.2.140.0030.01810.04
5.2.130.0020.01810.02
5.2.120.0040.01410.02
5.2.110.0060.01810.02
5.2.100.0070.01510.02
5.2.90.0040.02010.02
5.2.80.0040.01710.02
5.2.70.0040.01810.02
5.2.60.0040.0189.99
5.2.50.0050.0209.98
5.2.40.0040.0189.97
5.2.30.0040.0209.96
5.2.20.0040.0189.95
5.2.10.0060.0149.92
5.2.00.0060.0179.85
5.1.60.0040.0149.49
5.1.50.0060.0129.49
5.1.40.0070.0129.48
5.1.30.0060.0139.65
5.1.20.0020.0179.66
5.1.10.0020.0189.53
5.1.00.0050.0149.53
5.0.50.0030.0108.77
5.0.40.0030.0158.70
5.0.30.0010.0218.60
5.0.20.0020.0168.59
5.0.10.0040.0098.57
5.0.00.0040.0158.57
4.4.90.0030.0107.84
4.4.80.0040.0077.82
4.4.70.0020.0097.83
4.4.60.0000.0117.82
4.4.50.0040.0077.84
4.4.40.0020.0147.80
4.4.30.0030.0097.83
4.4.20.0020.0107.87
4.4.10.0030.0087.88
4.4.00.0040.0127.83
4.3.110.0040.0077.79
4.3.100.0020.0087.78
4.3.90.0010.0107.77
4.3.80.0010.0157.74
4.3.70.0030.0077.77
4.3.60.0020.0117.76
4.3.50.0020.0097.76
4.3.40.0020.0137.72
4.3.30.0010.0117.10
4.3.20.0020.0097.09
4.3.10.0040.0107.07
4.3.00.0000.01212.24

preferences:
41.77 ms | 401 KiB | 5 Q