3v4l.org

run code in 300+ PHP versions simultaneously
<?php $anna_array = array("soccer" => "10", "basketball" => "20", "atletics" => "40"); $john_array = array("soccer" => "15", "basketball" => "15", "atletics" => "45"); $common_sports = array_keys(array_intersect_key($anna_array, $john_array)); $points_anna_array = $points_john_array = array_fill_keys($common_sports, 0); foreach ($common_sports as $common_sport) { if ($anna_array[$common_sport] > $john_array[$common_sport]) { $points_anna_array[$common_sport]++; } else if ($anna_array[$common_sport] < $john_array[$common_sport]) { $points_john_array[$common_sport]++; } } foreach ($common_sports as $common_sport) { echo sprintf( 'Anna(%s) %d vs John(%s) %d'."\n", $common_sport, $points_anna_array[$common_sport], $common_sport, $points_john_array[$common_sport] ); }

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.4.130.0080.00117.51
8.4.120.0080.01224.20
8.4.110.0140.00620.64
8.4.100.0130.00818.54
8.4.90.0130.00620.86
8.4.80.0120.01018.97
8.4.70.0110.00917.91
8.4.60.0100.01018.90
8.4.50.0130.00818.02
8.4.40.0100.00917.83
8.4.30.0140.00417.61
8.4.20.0070.01117.78
8.4.10.0160.00317.71
8.3.250.0120.00618.98
8.3.240.0130.00417.26
8.3.230.0090.01016.28
8.3.220.0040.00419.06
8.3.210.0080.00618.50
8.3.200.0050.00416.61
8.3.190.0130.00616.79
8.3.180.0080.00916.72
8.3.170.0030.00618.95
8.3.160.0030.00618.59
8.3.150.0110.00417.19
8.3.140.0080.00016.85
8.3.130.0080.00016.92
8.3.120.0000.00819.08
8.3.110.0080.00020.94
8.3.100.0030.00624.06
8.3.90.0040.00426.77
8.3.80.0030.00916.63
8.3.70.0070.01416.88
8.3.60.0090.00618.30
8.3.50.0160.00822.05
8.3.40.0130.00318.77
8.3.30.0090.00918.72
8.3.20.0070.00720.13
8.3.10.0040.00420.52
8.3.00.0040.00421.89
8.2.290.0090.00220.36
8.2.280.0040.00518.71
8.2.270.0130.00617.20
8.2.260.0040.01118.83
8.2.250.0050.00316.69
8.2.240.0060.00318.69
8.2.230.0070.01022.58
8.2.220.0060.00937.54
8.2.210.0080.00026.77
8.2.200.0030.00616.50
8.2.190.0150.00016.88
8.2.180.0100.01025.92
8.2.170.0110.00418.95
8.2.160.0030.01022.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0040.00421.11
8.2.120.0000.00826.35
8.2.110.0060.00321.05
8.2.100.0110.00017.84
8.2.90.0040.00420.64
8.2.80.0000.00820.38
8.2.70.0030.00617.50
8.2.60.0040.00417.50
8.2.50.0090.00017.25
8.2.40.0020.00518.16
8.2.30.0040.00419.61
8.2.20.0070.00017.65
8.2.10.0050.00318.25
8.2.00.0000.00718.13
8.1.330.0120.00921.88
8.1.320.0080.01116.01
8.1.310.0140.00416.66
8.1.300.0110.00016.13
8.1.290.0060.00318.88
8.1.280.0170.00325.92
8.1.270.0040.00424.66
8.1.260.0080.00028.09
8.1.250.0000.00728.09
8.1.240.0060.00322.09
8.1.230.0080.00320.92
8.1.220.0000.00817.77
8.1.210.0050.00319.03
8.1.200.0060.00317.11
8.1.190.0030.00717.00
8.1.180.0030.00518.10
8.1.170.0060.00317.62
8.1.160.0070.00022.21
8.1.150.0040.00418.93
8.1.140.0000.00819.60
8.1.130.0000.00717.72
8.1.120.0050.00317.57
8.1.110.0070.00017.36
8.1.100.0070.00017.48
8.1.90.0040.00417.38
8.1.80.0050.00217.42
8.1.70.0070.00017.35
8.1.60.0040.00417.61
8.1.50.0050.00317.53
8.1.40.0000.00817.54
8.1.30.0040.00417.68
8.1.20.0040.00417.42
8.1.10.0040.00417.60
8.1.00.0050.00317.58
8.0.300.0040.00420.07
8.0.290.0000.00916.63
8.0.280.0030.00318.46
8.0.270.0000.00717.28
8.0.260.0030.00317.34
8.0.250.0000.00717.02
8.0.240.0050.00216.84
8.0.230.0030.00316.84
8.0.220.0000.00616.95
8.0.210.0040.00416.96
8.0.200.0060.00016.87
8.0.190.0070.00017.02
8.0.180.0040.00416.82
8.0.170.0000.00716.82
8.0.160.0000.00716.80
8.0.150.0000.00716.88
8.0.140.0000.00716.79
8.0.130.0030.00313.30
8.0.120.0040.00416.93
8.0.110.0000.00716.96
8.0.100.0050.00316.95
8.0.90.0040.00416.82
8.0.80.0040.01116.89
8.0.70.0050.00316.78
8.0.60.0080.00016.79
8.0.50.0050.00316.80
8.0.30.0080.00817.23
8.0.20.0120.01017.40
8.0.10.0030.00517.07
8.0.00.0120.00616.73
7.4.330.0050.00016.73
7.4.320.0030.00316.57
7.4.300.0000.00616.43
7.4.290.0030.00316.43
7.4.280.0080.00016.50
7.4.270.0070.00016.64
7.4.260.0040.00416.56
7.4.250.0000.00716.63
7.4.240.0040.00416.64
7.4.230.0040.00416.60
7.4.220.0190.00716.58
7.4.210.0120.00416.55
7.4.200.0000.00716.53
7.4.160.0090.00616.61
7.4.150.0190.00317.40
7.4.140.0090.01317.86
7.4.130.0160.00516.47
7.4.120.0090.01116.56
7.4.110.0070.01016.64
7.4.100.0060.01216.38
7.4.90.0030.02016.43
7.4.80.0140.00719.39
7.4.70.0140.00716.52
7.4.60.0070.01016.61
7.4.50.0120.00316.43
7.4.40.0090.00916.45
7.4.30.0060.00916.70
7.4.10.0080.00814.86
7.4.00.0020.01515.04
7.3.330.0060.00013.22
7.3.320.0060.00013.20
7.3.310.0020.00516.30
7.3.300.0070.00016.34
7.3.290.0080.00816.34
7.3.280.0080.00816.34
7.3.270.0090.00917.40
7.3.260.0200.00416.50
7.3.250.0110.00716.38
7.3.240.0110.00816.36
7.3.230.0040.01916.66
7.3.210.0030.01316.57
7.3.200.0040.01216.73
7.3.190.0120.00416.32
7.3.180.0150.00616.50
7.3.170.0080.00816.54
7.3.160.0060.00916.54
7.3.130.0070.01014.77
7.3.120.0070.01114.83
7.3.110.0030.01614.53
7.3.100.0060.00914.88
7.3.90.0070.01014.84
7.3.80.0120.00314.67
7.3.70.0070.01114.48
7.3.60.0060.00914.73
7.3.50.0060.00314.11
7.3.40.0110.00314.55
7.3.30.0060.00914.75
7.3.20.0030.01016.68
7.3.10.0040.01116.44
7.3.00.0050.00516.55
7.2.330.0160.01016.71
7.2.320.0000.02316.77
7.2.310.0120.00616.47
7.2.300.0160.00616.58
7.2.290.0030.01316.84
7.2.260.0030.01015.08
7.2.250.0090.00915.19
7.2.240.0100.00714.75
7.2.230.0090.00914.58
7.2.220.0000.01414.92
7.2.210.0080.00814.67
7.2.200.0090.00614.89
7.2.190.0100.00614.91
7.2.180.0130.00614.86
7.2.170.0030.01015.05
7.2.160.0030.01414.84
7.2.150.0040.00816.67
7.2.140.0040.01117.04
7.2.130.0040.00816.95
7.2.120.0000.01016.58
7.2.110.0030.01216.91
7.2.100.0040.01116.83
7.2.90.0000.01416.60
7.2.80.0090.00316.68
7.2.70.0060.01216.91
7.2.60.0090.00916.95
7.2.50.0090.00916.54
7.2.40.0000.01017.05
7.2.30.0080.00416.86
7.2.20.0110.00416.59
7.2.10.0070.00716.85
7.2.00.0070.01018.16
7.1.330.0030.01315.63
7.1.320.0060.00615.64
7.1.310.0070.01015.27
7.1.300.0080.00615.87
7.1.290.0070.00715.48
7.1.280.0040.01515.46
7.1.270.0040.00415.38
7.1.260.0040.00415.66
7.1.250.0030.00915.88
7.1.240.0040.00415.60
7.1.230.0060.00615.48
7.1.220.0130.00015.71
7.1.210.0030.00915.66
7.1.200.0020.00715.60
7.1.190.0030.01315.49
7.1.180.0140.00315.39
7.1.170.0080.00815.64
7.1.160.0060.00615.62
7.1.150.0080.00815.67
7.1.140.0090.00415.70
7.1.130.0030.00715.73
7.1.120.0000.01115.88
7.1.110.0050.00515.80
7.1.100.0050.00816.84
7.1.90.0060.00615.47
7.1.80.0060.00915.45
7.1.70.0020.00716.40
7.1.60.0090.00917.46
7.1.50.0050.01216.29
7.1.40.0070.00715.54
7.1.30.0060.00315.76
7.1.20.0030.01015.74
7.1.10.0030.00715.56
7.1.00.0050.04219.00
7.0.330.0000.01115.25
7.0.320.0070.00715.36
7.0.310.0120.00315.41
7.0.300.0000.01815.36
7.0.290.0100.00315.12
7.0.280.0090.00015.64
7.0.270.0070.00715.26
7.0.260.0080.00315.32
7.0.250.0040.00715.41
7.0.240.0070.00715.47
7.0.230.0100.00315.35
7.0.220.0080.00015.39
7.0.210.0060.00315.13
7.0.200.0410.00915.07
7.0.190.0070.00715.25
7.0.180.0030.00915.02
7.0.170.0050.00515.31
7.0.160.0040.00715.36
7.0.150.0130.00315.25
7.0.140.0000.01415.29
7.0.130.0000.01315.41
7.0.120.0080.00415.21
7.0.110.0030.00615.15
7.0.100.0030.02618.67
7.0.90.0030.02418.48
7.0.80.0020.03018.54
7.0.70.0050.03818.44
7.0.60.0010.02418.58
7.0.50.0030.02518.81
7.0.40.0000.02616.87
7.0.30.0080.02016.87
7.0.20.0020.04816.88
7.0.10.0070.02216.86
7.0.00.0030.02716.81
5.6.400.0080.00813.98
5.6.390.0000.01414.01
5.6.380.0070.00714.30
5.6.370.0090.00614.66
5.6.360.0000.01214.75
5.6.350.0050.00514.35
5.6.340.0130.00014.46
5.6.330.0110.00314.62
5.6.320.0060.00914.17
5.6.310.0060.00914.41
5.6.300.0070.01014.04
5.6.290.0120.00314.00
5.6.280.0050.03517.71
5.6.270.0030.00614.59
5.6.260.0000.01014.41
5.6.250.0070.03517.61
5.6.240.0050.02917.12
5.6.230.0050.03917.39
5.6.220.0060.03617.45
5.6.210.0000.04117.54
5.6.200.0020.02817.78
5.6.190.0050.02417.69
5.6.180.0030.03417.58
5.6.170.0060.02817.61
5.6.160.0040.02417.57
5.6.150.0060.02217.53
5.6.140.0070.03717.62
5.6.130.0050.02517.64
5.6.120.0050.02217.73
5.6.110.0060.02417.87
5.6.100.0030.03017.59
5.6.90.0020.02717.68
5.6.80.0050.03517.25
5.6.70.0020.02317.39
5.6.60.0020.02317.42
5.6.50.0020.02617.19
5.6.40.0020.02217.30
5.6.30.0030.04117.27
5.6.20.0030.02417.26
5.6.10.0020.04417.44
5.6.00.0020.05317.28
5.5.380.0070.02217.38
5.5.370.0030.03517.12
5.5.360.0030.02317.22
5.5.350.0040.02917.32
5.5.340.0020.02517.41
5.5.330.0050.02017.65
5.5.320.0030.02517.39
5.5.310.0020.02617.54
5.5.300.0000.02617.62
5.5.290.0030.03017.39
5.5.280.0050.02817.46
5.5.270.0020.02617.52
5.5.260.0040.02417.73
5.5.250.0020.03717.42
5.5.240.0030.02317.21
5.5.230.0020.03517.23
5.5.220.0000.03617.23
5.5.210.0020.02617.33
5.5.200.0050.03317.21
5.5.190.0000.04217.24
5.5.180.0070.02217.33
5.5.170.0070.00714.43
5.5.160.0030.02517.31
5.5.150.0030.03217.26
5.5.140.0080.04617.23
5.5.130.0030.04117.24
5.5.120.0030.02317.15
5.5.110.0060.02017.13
5.5.100.0060.02817.07
5.5.90.0010.03116.99
5.5.80.0070.02317.35
5.5.70.0030.02316.95
5.5.60.0000.02417.23
5.5.50.0030.02217.03
5.5.40.0060.02517.16
5.5.30.0100.03216.98
5.5.20.0060.02117.24
5.5.10.0070.03117.20
5.5.00.0050.03317.13

preferences:
37.28 ms | 403 KiB | 5 Q