3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d = [ [ 'type' => 25500, 'month' => 'July' ], [ 'type' => 5465, 'month' => 'January' ], [ 'type' => 40000, 'month' => 'April' ], [ 'type' => 35000, 'month' => 'June' ], [ 'type' => 10000, 'month' => 'February' ] ]; $allMonths = ['January','February','March', 'April','May','June','July','August','September','October','November','December']; $currentMonths = array_column($d, 'month'); $notIncludedMonth = array_diff($allMonths,$currentMonths); foreach ($notIncludedMonth as $month) { $d[] = [ 'type' => 0, 'month' => $month, ]; } print_r($d);

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.0130.00620.32
8.4.110.0050.00422.38
8.4.100.0090.01118.92
8.4.90.0040.00520.65
8.4.80.0060.00217.73
8.4.70.0130.00717.76
8.4.60.0100.01218.95
8.4.50.0090.01125.81
8.4.40.0100.01019.20
8.4.30.0130.00718.66
8.4.20.0100.01018.57
8.4.10.0060.00317.72
8.3.250.0140.00818.83
8.3.240.0130.00716.52
8.3.230.0110.00916.43
8.3.220.0080.00818.95
8.3.210.0090.01118.40
8.3.200.0040.00516.60
8.3.190.0010.00617.24
8.3.180.0110.00916.83
8.3.170.0040.01517.17
8.3.160.0110.00716.43
8.3.150.0040.00416.48
8.3.140.0060.01316.70
8.3.130.0030.00618.16
8.3.120.0170.00318.81
8.3.110.0040.00418.19
8.3.100.0080.00816.50
8.3.90.0060.00326.77
8.3.80.0090.00016.63
8.3.70.0070.00716.63
8.3.60.0100.01016.50
8.3.50.0110.00618.23
8.3.40.0130.00319.31
8.3.30.0070.00718.72
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0030.00626.16
8.2.290.0100.00820.18
8.2.280.0110.00719.17
8.2.270.0110.00717.23
8.2.260.0030.00716.46
8.2.250.0040.00418.58
8.2.240.0030.00617.06
8.2.230.0110.00720.94
8.2.220.0080.00424.06
8.2.210.0090.00926.77
8.2.200.0040.00416.88
8.2.190.0170.00016.58
8.2.180.0120.00325.92
8.2.170.0000.01519.09
8.2.160.0030.01022.96
8.2.150.0000.00925.66
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0080.00020.85
8.2.110.0040.00420.97
8.2.100.0080.00419.57
8.2.90.0030.00619.70
8.2.80.0000.00918.13
8.2.70.0060.00617.93
8.2.60.0040.00418.15
8.2.50.0040.00418.10
8.2.40.0040.00421.06
8.2.30.0030.00619.38
8.2.20.0040.00418.05
8.2.10.0000.00719.24
8.2.00.0040.00419.38
8.1.330.0050.00321.78
8.1.320.0110.00916.25
8.1.310.0140.00318.32
8.1.300.0090.00018.42
8.1.290.0090.00018.88
8.1.280.0180.00425.92
8.1.270.0060.00323.73
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00323.65
8.1.230.0000.01122.71
8.1.220.0030.00717.79
8.1.210.0110.00018.88
8.1.200.0000.00917.25
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0040.00418.56
8.1.160.0040.00420.71
8.1.150.0000.00818.93
8.1.140.0030.00319.08
8.1.130.0000.00720.07
8.1.120.0050.00317.50
8.1.110.0000.00817.44
8.1.100.0030.00517.41
8.1.90.0040.00417.48
8.1.80.0070.00317.43
8.1.70.0050.00517.52
8.1.60.0040.00417.56
8.1.50.0050.00317.49
8.1.40.0060.00317.58
8.1.30.0030.00617.66
8.1.20.0040.00417.63
8.1.10.0030.00517.53
8.1.00.0000.00817.50
8.0.300.0000.00719.57
8.0.290.0000.00816.75
8.0.280.0000.00718.51
8.0.270.0000.00716.81
8.0.260.0000.00718.43
8.0.250.0070.00016.90
8.0.240.0000.00717.00
8.0.230.0040.00416.95
8.0.220.0000.00716.85
8.0.210.0030.00416.78
8.0.200.0000.00617.02
8.0.190.0040.00416.85
8.0.180.0090.00016.93
8.0.170.0060.00316.93
8.0.160.0000.00816.96
8.0.150.0070.00416.83
8.0.140.0000.00716.77
8.0.130.0060.00013.29
8.0.120.0080.00016.85
8.0.110.0070.00016.79
8.0.100.0050.00316.77
8.0.90.0040.00416.96
8.0.80.0120.00916.89
8.0.70.0160.00016.92
8.0.60.0080.00816.77
8.0.50.0030.01216.82
8.0.30.0150.00316.77
8.0.20.0040.01216.86
8.0.10.0040.01117.04
8.0.00.0060.00917.00
7.4.330.0050.00015.55
7.4.320.0000.00716.52
7.4.300.0030.00316.49
7.4.290.0090.00016.38
7.4.280.0070.00416.52
7.4.270.0000.00716.56
7.4.260.0060.00013.39
7.4.250.0100.00016.49
7.4.240.0040.00316.57
7.4.230.0070.00016.61
7.4.220.0000.00716.48
7.4.210.0030.01516.50
7.4.200.0150.00316.45
7.4.190.0060.00816.61
7.4.180.0060.01316.72
7.4.160.0030.01016.70
7.4.150.0040.00916.43
7.4.140.0050.00916.43
7.4.130.0090.00616.52
7.4.120.0060.00916.43
7.4.110.0030.01516.55
7.4.100.0120.00716.62
7.4.90.0050.01516.39
7.4.80.0160.00016.45
7.4.70.0000.01316.28
7.4.60.0040.01116.50
7.4.50.0070.00716.36
7.4.40.0060.00816.30
7.4.30.0060.00816.46
7.4.20.0070.00716.57
7.4.10.0140.00016.54
7.4.00.0100.00316.38
7.3.330.0030.00316.40
7.3.320.0030.00313.21
7.3.310.0000.00716.53
7.3.300.0040.00416.19
7.3.290.0050.00816.38
7.3.280.0120.00216.36
7.3.270.0040.01116.33
7.3.260.0060.01016.28
7.3.250.0160.00016.34
7.3.240.0090.00916.32
7.3.230.0140.00416.34
7.3.220.0070.01416.26
7.3.210.0130.00616.34
7.3.200.0080.01216.22
7.3.190.0160.00316.32
7.3.180.0080.01116.30
7.3.170.0020.01316.25
7.3.160.0070.00716.30
7.3.150.0070.00716.21
7.3.140.0090.00616.25
7.3.130.0100.00316.25
7.3.120.0100.00316.24
7.3.110.0060.00616.20
7.3.100.0080.00516.19
7.3.90.0110.00316.52
7.3.80.0030.01116.27
7.3.70.0080.00616.34
7.3.60.0120.00616.36
7.3.50.0090.00416.46
7.3.40.0070.00716.46
7.3.30.0000.01416.46
7.3.20.0060.00916.46
7.3.10.0100.00316.38
7.3.00.0170.00316.37

preferences:
27.77 ms | 403 KiB | 5 Q