3v4l.org

run code in 300+ PHP versions simultaneously
<?php $master = array(); $arrColors = array('R', 'B', 'G' ,'Y'); $arrNumbers = array('1', '2', '3', '4'); foreach($arrColors as $color) { foreach($arrNumbers as $num) { $arr2 = array_push($master, $color); //$master += array($color => $num); //echo $color.' => '.$num; //echo "\n"; } array_push($arr2, $num); } print_r($master);

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.0100.01018.40
8.3.50.0130.00521.91
8.3.40.0070.01418.97
8.3.30.0070.01119.06
8.3.20.0040.00420.33
8.3.10.0080.00020.70
8.3.00.0080.00019.29
8.2.180.0070.01116.75
8.2.170.0140.00722.96
8.2.160.0040.01120.45
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0070.00020.83
8.2.110.0070.00419.27
8.2.100.0120.00017.91
8.2.90.0090.00019.24
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0080.00017.93
8.2.50.0040.00718.07
8.2.40.0040.00418.09
8.2.30.0040.00418.07
8.2.20.0040.00417.75
8.2.10.0070.00018.12
8.2.00.0000.00817.89
8.1.280.0030.01425.92
8.1.270.0040.00422.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00321.01
8.1.230.0040.00717.42
8.1.220.0000.00717.79
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0030.00517.35
8.1.180.0030.00618.10
8.1.170.0040.00418.46
8.1.160.0000.00822.06
8.1.150.0040.00418.89
8.1.140.0070.00017.54
8.1.130.0040.00417.71
8.1.120.0050.00217.50
8.1.110.0000.00717.35
8.1.100.0000.00817.51
8.1.90.0000.00717.36
8.1.80.0030.00517.36
8.1.70.0070.00017.47
8.1.60.0030.00617.47
8.1.50.0050.00317.43
8.1.40.0040.00417.40
8.1.30.0030.00517.54
8.1.20.0000.00817.59
8.1.10.0030.00617.62
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00818.33
8.0.270.0040.00417.30
8.0.260.0030.00318.53
8.0.250.0080.00017.06
8.0.240.0000.00716.94
8.0.230.0030.00317.02
8.0.220.0000.00717.00
8.0.210.0030.00317.00
8.0.200.0030.00317.05
8.0.190.0080.00017.09
8.0.180.0050.00216.87
8.0.170.0060.00316.82
8.0.160.0070.00016.93
8.0.150.0030.00516.93
8.0.140.0030.00416.95
8.0.130.0000.00513.39
8.0.120.0040.00416.85
8.0.110.0040.00416.99
8.0.100.0000.00816.86
8.0.90.0040.00416.87
8.0.80.0060.00916.91
8.0.70.0040.00417.01
8.0.60.0000.00716.95
8.0.50.0040.00416.87
8.0.30.0110.01117.15
8.0.20.0050.01417.44
8.0.10.0040.00417.04
8.0.00.0090.00916.85
7.4.330.0000.00515.06
7.4.320.0000.00616.61
7.4.300.0030.00316.56
7.4.290.0060.00016.61
7.4.280.0040.00416.52
7.4.270.0050.00216.56
7.4.260.0000.00716.51
7.4.250.0000.00716.55
7.4.240.0020.00516.53
7.4.230.0000.00716.61
7.4.220.0060.01316.68
7.4.210.0060.00916.57
7.4.200.0000.00716.68
7.4.160.0060.00916.43
7.4.150.0060.01217.40
7.4.140.0120.00617.86
7.4.130.0110.00616.44
7.4.120.0100.00716.41
7.4.110.0070.01016.67
7.4.100.0040.01716.76
7.4.90.0110.00716.53
7.4.80.0150.00919.39
7.4.70.0060.01116.63
7.4.60.0090.01216.46
7.4.50.0030.00516.55
7.4.40.0070.01116.57
7.4.30.0060.01216.48
7.4.00.0040.00814.88
7.3.330.0020.00313.12
7.3.320.0050.00013.25
7.3.310.0080.00016.18
7.3.300.0030.00316.23
7.3.290.0000.01616.36
7.3.280.0080.00916.29
7.3.270.0110.00717.40
7.3.260.0070.01016.32
7.3.250.0130.00716.29
7.3.240.0030.01316.46
7.3.230.0130.00616.39
7.3.210.0130.00416.39
7.3.200.0120.00919.39
7.3.190.0050.01116.33
7.3.180.0100.00716.43
7.3.170.0100.00916.38
7.3.160.0030.01316.22
7.2.330.0120.00816.61
7.2.320.0060.00916.73
7.2.310.0030.01316.66
7.2.300.0130.00316.68
7.2.290.0160.00916.45
7.2.60.0040.01117.03
7.2.00.0060.00319.62
7.1.200.0070.00715.84
7.1.100.0000.01017.75
7.1.70.0000.00817.23
7.1.60.0070.01719.32
7.1.50.0140.01016.91
7.1.00.0030.07722.51
7.0.200.0000.01016.97
7.0.140.0030.07322.08
7.0.60.0070.08319.79
7.0.50.0030.04017.84
7.0.40.0030.08720.18
7.0.30.0500.06720.33
7.0.20.0330.07020.33
7.0.10.0100.06320.05
7.0.00.0070.05020.26
5.6.280.0000.07721.00
5.6.210.0030.08720.63
5.6.200.0100.05018.23
5.6.190.0030.04320.39
5.6.180.0400.08020.47
5.6.170.0300.08320.46
5.6.160.0000.09320.50
5.6.150.0100.07718.12
5.6.140.0070.03718.22
5.6.130.0130.09318.14
5.6.120.0030.09020.88
5.6.110.0070.04321.09
5.6.100.0030.06320.95
5.6.90.0070.07321.05
5.6.80.0130.07720.37
5.5.350.0170.08320.43
5.5.340.0070.04318.00
5.5.330.0070.04020.35
5.5.320.0270.07720.35
5.5.310.0270.07020.34
5.5.300.0130.07317.98
5.5.290.0030.08318.05
5.5.280.0070.03720.63
5.5.270.0130.06320.86
5.5.260.0070.08720.88
5.5.250.0130.07320.54
5.5.240.0170.07720.35
5.4.450.0330.04319.32
5.4.440.0230.04019.54
5.4.430.0530.06019.47
5.4.420.0670.00019.51
5.4.410.0630.00019.21
5.4.400.0700.00019.27
5.4.390.0630.00019.21
5.4.380.0630.00019.26
5.4.370.0600.00018.99
5.4.360.0600.00019.26
5.4.350.0630.00019.09
5.4.340.0600.00019.11
5.4.320.0130.04312.48
5.4.310.0080.04812.48
5.4.300.0080.04012.48
5.4.290.0080.03912.48
5.4.280.0040.03812.38
5.4.270.0080.03412.38
5.4.260.0080.04212.38
5.4.250.0080.03812.38
5.4.240.0060.03612.38
5.4.230.0070.04012.37
5.4.220.0120.03812.37
5.4.210.0080.03912.37
5.4.200.0070.03712.37
5.4.190.0050.03812.36
5.4.180.0050.03812.37
5.4.170.0060.03812.38
5.4.160.0070.03812.38
5.4.150.0070.04912.37
5.4.140.0060.03712.05
5.4.130.0070.03412.04
5.4.120.0080.03812.00
5.4.110.0050.03711.99
5.4.100.0070.04411.99
5.4.90.0020.04012.00
5.4.80.0040.03911.99
5.4.70.0080.03411.99
5.4.60.0050.03611.99
5.4.50.0070.03711.99
5.4.40.0050.03611.98
5.4.30.0060.03811.98
5.4.20.0040.03711.98
5.4.10.0070.03611.98
5.4.00.0060.04111.47
5.3.290.0040.04312.80
5.3.280.0090.03812.71
5.3.270.0070.03812.72
5.3.260.0060.04512.72
5.3.250.0060.04312.72
5.3.240.0070.03912.72
5.3.230.0050.03912.71
5.3.220.0040.04912.68
5.3.210.0040.04312.68
5.3.200.0050.04812.68
5.3.190.0070.04012.68
5.3.180.0070.03712.68
5.3.170.0120.03312.67
5.3.160.0100.03712.67
5.3.150.0050.04012.67
5.3.140.0080.03612.66
5.3.130.0090.04612.66
5.3.120.0060.04012.66
5.3.110.0100.03512.66
5.3.100.0070.03812.12
5.3.90.0070.03612.09
5.3.80.0100.03412.08
5.3.70.0080.04512.08
5.3.60.0070.03912.06
5.3.50.0070.03612.02
5.3.40.0120.03112.02
5.3.30.0040.03911.97
5.3.20.0040.03811.75
5.3.10.0080.03311.72
5.3.00.0050.03711.70
5.2.170.0050.0369.21
5.2.160.0100.0299.21
5.2.150.0030.0339.21
5.2.140.0040.0319.20
5.2.130.0070.0279.17
5.2.120.0090.0319.17
5.2.110.0080.0289.18
5.2.100.0060.0279.17
5.2.90.0050.0329.16
5.2.80.0040.0319.16
5.2.70.0040.0339.16
5.2.60.0040.0319.11
5.2.50.0050.0359.08
5.2.40.0030.0309.06
5.2.30.0040.0319.03
5.2.20.0050.0329.03
5.2.10.0040.0298.94
5.2.00.0060.0288.80
5.1.60.0070.0318.07
5.1.50.0080.0288.07
5.1.40.0060.0258.04
5.1.30.0050.0258.39
5.1.20.0050.0318.41
5.1.10.0080.0258.14
5.1.00.0050.0278.14
5.0.50.0040.0206.62
5.0.40.0020.0206.48
5.0.30.0050.0376.29
5.0.20.0040.0256.26
5.0.10.0060.0206.24
5.0.00.0050.0316.23
4.4.90.0040.0194.78
4.4.80.0020.0164.75
4.4.70.0030.0154.75
4.4.60.0050.0214.75
4.4.50.0060.0154.77
4.4.40.0040.0284.71
4.4.30.0040.0234.76
4.4.20.0030.0214.84
4.4.10.0020.0184.85
4.4.00.0010.0274.76
4.3.110.0020.0164.67
4.3.100.0030.0164.66
4.3.90.0010.0204.63
4.3.80.0050.0234.58
4.3.70.0040.0154.63
4.3.60.0050.0154.63
4.3.50.0010.0174.63
4.3.40.0010.0264.54
4.3.30.0020.0223.29
4.3.20.0020.0233.26
4.3.10.0020.0163.22
4.3.00.0100.01713.59

preferences:
45.58 ms | 401 KiB | 5 Q