3v4l.org

run code in 300+ PHP versions simultaneously
<?php $season_data = [ 'Paul' => [ 'Season' => [2014, 2015, 2016] ], 'John' => [ 'Season' => [2012] ] ]; $appearance_data = [ 'Paul' => [ 'Appearance'=> [ 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2015, 2015, 2015 ] ], 'John' => [ 'Appearance' => [ 2012, 2012, 2012, 2012 ] ] ]; foreach ($season_data as $person => $data) { foreach ($data['Season'] as $year) { $result[$person]['SeasonCounts'][$year] = 0; foreach ($appearance_data[$person]['Appearance'] as $appearance) { if ($appearance == $year) { ++$result[$person]['SeasonCounts'][$year]; } } } } var_export($result);

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.120.0120.00923.95
8.4.110.0110.00619.65
8.4.100.0090.00718.70
8.4.90.0160.00420.51
8.4.80.0110.00820.59
8.4.70.0130.00717.77
8.4.60.0120.00718.82
8.4.50.0040.00518.73
8.4.40.0160.00019.28
8.4.30.0170.00319.57
8.4.20.0060.01320.54
8.4.10.0040.00419.29
8.3.250.0060.00419.09
8.3.240.0120.00717.27
8.3.230.0120.00716.82
8.3.220.0110.00818.98
8.3.210.0030.00516.61
8.3.200.0040.00516.61
8.3.190.0060.00319.05
8.3.180.0090.00816.66
8.3.170.0090.00920.87
8.3.160.0040.01416.56
8.3.150.0080.01218.92
8.3.140.0040.00420.66
8.3.130.0060.00618.46
8.3.120.0060.01218.98
8.3.110.0040.00420.94
8.3.100.0000.01216.51
8.3.90.0090.00920.13
8.3.80.0030.00618.56
8.3.70.0090.00616.38
8.3.60.0040.01118.31
8.3.50.0060.01316.54
8.3.40.0110.01118.64
8.3.30.0070.00718.71
8.3.20.0060.00321.76
8.3.10.0040.00419.92
8.3.00.0040.00421.96
8.2.290.0100.00720.47
8.2.280.0130.00618.59
8.2.270.0110.00717.10
8.2.260.0070.01018.80
8.2.250.0040.00416.46
8.2.240.0000.00918.72
8.2.230.0040.00422.58
8.2.220.0090.00024.06
8.2.210.0080.00026.77
8.2.200.0030.00618.29
8.2.190.0200.00016.58
8.2.180.0040.01116.50
8.2.170.0150.00022.96
8.2.160.0110.00320.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0100.00026.16
8.2.120.0000.00720.85
8.2.110.0070.00320.52
8.2.100.0080.00417.91
8.2.90.0000.00817.75
8.2.80.0030.00618.77
8.2.70.0000.00817.75
8.2.60.0080.00017.38
8.2.50.0000.00918.10
8.2.40.0030.00519.46
8.2.30.0000.00720.38
8.2.20.0000.00718.15
8.2.10.0040.00419.18
8.2.00.0000.00818.11
8.1.330.0080.01021.75
8.1.320.0080.01216.25
8.1.310.0140.00016.90
8.1.300.0090.00917.71
8.1.290.0090.00018.88
8.1.280.0070.01025.92
8.1.270.0080.00020.28
8.1.260.0000.00826.35
8.1.250.0000.00928.09
8.1.240.0050.00519.63
8.1.230.0000.01220.93
8.1.220.0000.00817.78
8.1.210.0060.00318.77
8.1.200.0050.00317.36
8.1.190.0030.00517.52
8.1.180.0070.00318.10
8.1.170.0040.00418.56
8.1.160.0040.00418.80
8.1.150.0070.00018.88
8.1.140.0050.00318.80
8.1.130.0000.00717.45
8.1.120.0040.00417.47
8.1.110.0040.00417.45
8.1.100.0060.00317.49
8.1.90.0070.00017.39
8.1.80.0060.00317.47
8.1.70.0030.00317.46
8.1.60.0000.00817.46
8.1.50.0030.00617.53
8.1.40.0060.00317.57
8.1.30.0000.00817.53
8.1.20.0000.00817.64
8.1.10.0000.00817.41
8.1.00.0030.00617.28
8.0.300.0050.00218.77
8.0.290.0080.00016.75
8.0.280.0000.00718.38
8.0.270.0030.00317.27
8.0.260.0030.00316.93
8.0.250.0030.00616.93
8.0.240.0080.00016.94
8.0.230.0030.00316.93
8.0.220.0000.00716.89
8.0.210.0040.00416.73
8.0.200.0000.00716.91
8.0.190.0000.00716.84
8.0.180.0000.00816.93
8.0.170.0090.00016.77
8.0.160.0060.00316.88
8.0.150.0000.00816.82
8.0.140.0000.00716.76
8.0.130.0000.00613.29
8.0.120.0070.00016.76
8.0.110.0040.00316.84
8.0.100.0040.00416.75
8.0.90.0040.00416.82
8.0.80.0090.00616.93
8.0.70.0000.00716.71
8.0.60.0080.00016.91
8.0.50.0000.00716.84
8.0.30.0070.01017.11
8.0.20.0120.00917.14
8.0.10.0070.00016.90
8.0.00.0100.00916.65
7.4.330.0040.00015.55
7.4.320.0030.00316.50
7.4.300.0000.00616.64
7.4.290.0000.00716.50
7.4.280.0070.00016.59
7.4.270.0040.00416.59
7.4.260.0000.00716.48
7.4.250.0000.00716.48
7.4.240.0000.00716.52
7.4.230.0030.00316.63
7.4.220.0030.00316.70
7.4.210.0090.00716.56
7.4.200.0000.00716.59
7.4.160.0090.00716.58
7.4.140.0070.01117.86
7.4.130.0090.01616.54
7.4.120.0120.00816.41
7.4.110.0070.01016.31
7.4.100.0130.00416.64
7.4.90.0040.01416.65
7.4.80.0070.01019.39
7.4.70.0110.01116.48
7.4.60.0100.00716.59
7.4.50.0120.00216.60
7.4.40.0080.00816.48
7.4.00.0080.00615.09
7.3.330.0030.00313.16
7.3.320.0030.00313.17
7.3.310.0070.00016.19
7.3.300.0030.00316.13
7.3.290.0030.00316.32
7.3.280.0050.01016.30
7.3.260.0120.00816.40
7.3.240.0080.00816.46
7.3.230.0060.01016.66
7.3.210.0030.01616.25
7.3.200.0100.00616.23
7.3.190.0100.01316.29
7.3.180.0110.00416.40
7.3.170.0000.01616.39
7.3.160.0070.01316.31
7.3.50.0040.00914.82
7.3.40.0060.00314.71
7.3.30.0110.00814.90
7.3.20.0030.01716.65
7.3.10.0070.01316.74
7.3.00.0080.00316.47
7.2.330.0140.00416.45
7.2.320.0090.01016.37
7.2.310.0030.01316.73
7.2.300.0080.01316.73
7.2.290.0140.00616.76
7.2.180.0070.00714.96
7.2.170.0060.00615.07
7.2.160.0110.01015.13
7.2.150.0120.00917.02
7.2.140.0070.01417.02
7.2.130.0050.00516.75
7.2.120.0120.00016.91
7.2.110.0060.01516.88
7.2.100.0100.00316.99
7.2.90.0080.00416.93
7.2.80.0090.01216.90
7.2.70.0000.01216.98
7.2.60.0060.01616.82
7.2.50.0150.00617.05
7.2.40.0000.01517.02
7.2.30.0030.01316.82
7.2.20.0070.00416.96
7.2.10.0030.01316.91
7.2.00.0080.00816.97
7.1.280.0060.01215.57
7.1.270.0090.00315.79
7.1.260.0080.00315.80
7.1.250.0090.00915.94

preferences:
128.66 ms | 403 KiB | 5 Q