3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "dates": [{ "orderId": 60132, "typeId": 7, "date": "2021-06-03T00:00:00+02:00" }, { "orderId": 60132, "typeId": 11, "date": "2021-05-28T00:00:00+02:00" }, { "orderId": 60132, "typeId": 16, "date": "2021-05-27T20:20:28+02:00" }, { "orderId": 60132, "typeId": 2, "date": "2021-05-27T20:19:21+02:00" }, { "orderId": 60132, "typeId": 4, "date": "2021-06-02T15:31:50+02:00" } ] }'; $arr = json_decode($json, true); $result = array_filter( array_map( function ($record) {if ($record['typeId'] == 11) return $record['date'];}, $arr['dates'] ) ); var_dump($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.3.60.0090.01218.31
8.3.50.0110.00716.36
8.3.40.0110.00418.42
8.3.30.0070.00718.72
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.180.0140.00425.92
8.2.170.0040.01118.99
8.2.160.0180.00322.96
8.2.150.0000.00725.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00326.35
8.2.110.0030.00621.12
8.2.100.0040.00817.91
8.2.90.0040.00417.88
8.2.80.0000.00818.82
8.2.70.0000.00917.46
8.2.60.0000.01118.04
8.2.50.0050.00318.05
8.2.40.0040.00419.89
8.2.30.0070.00018.01
8.2.20.0040.00418.04
8.2.10.0070.00019.39
8.2.00.0000.00719.32
8.1.280.0150.00425.92
8.1.270.0050.00323.99
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0130.00920.93
8.1.230.0060.00622.75
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0080.00017.36
8.1.180.0000.00818.10
8.1.170.0110.00318.30
8.1.160.0030.00618.99
8.1.150.0080.00019.01
8.1.140.0000.00718.84
8.1.130.0000.00720.21
8.1.120.0000.00817.32
8.1.110.0070.00017.47
8.1.100.0000.00817.43
8.1.90.0070.00017.38
8.1.80.0030.00617.35
8.1.70.0000.00817.47
8.1.60.0030.00517.60
8.1.50.0040.00417.53
8.1.40.0000.00717.54
8.1.30.0060.00317.55
8.1.20.0040.00417.64
8.1.10.0120.00017.57
8.1.00.0020.00517.42
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.31
8.0.270.0030.00317.88
8.0.260.0060.00018.54
8.0.250.0070.00016.91
8.0.240.0000.00716.89
8.0.230.0070.00016.93
8.0.220.0030.00316.82
8.0.210.0060.00316.82
8.0.200.0030.00316.92
8.0.190.0030.00516.86
8.0.180.0030.00616.91
8.0.170.0000.00816.90
8.0.160.0000.00716.83
8.0.150.0040.00316.81
8.0.140.0000.00716.75
8.0.130.0060.00013.30
8.0.120.0080.00016.92
8.0.110.0040.00416.90
8.0.100.0000.00716.93
8.0.90.0070.00016.77
8.0.80.0060.01016.96
8.0.70.0070.00016.79
8.0.60.0050.00216.89
8.0.50.0050.00316.93
8.0.30.0060.01016.95
8.0.20.0070.01016.98
8.0.10.0060.01016.96
8.0.00.0150.00616.98
7.4.330.0000.00415.55
7.4.320.0030.00316.66
7.4.300.0050.00216.51
7.4.290.0040.00416.45
7.4.280.0000.00816.36
7.4.270.0000.00816.56
7.4.260.0000.00513.19
7.4.250.0000.00716.47
7.4.240.0070.00016.63
7.4.230.0000.00716.69
7.4.220.0040.00416.69
7.4.210.0050.00916.54
7.4.200.0030.00316.51
7.4.160.0040.01116.52
7.4.150.0100.01016.48
7.4.140.0140.00716.35
7.4.130.0080.01216.30
7.4.120.0080.00816.36
7.4.110.0060.00916.32
7.4.100.0040.01116.57
7.4.90.0070.00716.34
7.4.80.0130.00316.29
7.4.70.0040.01216.34
7.4.60.0100.00516.51
7.4.50.0040.01016.41
7.4.40.0060.01016.37
7.4.30.0100.00316.43
7.4.20.0080.00816.28
7.4.10.0080.00616.38
7.4.00.0100.01016.49
7.3.330.0060.00016.19
7.3.320.0000.00613.29
7.3.310.0030.00316.12
7.3.300.0030.00316.35
7.3.290.0060.01016.20
7.3.280.0130.00016.21
7.3.270.0080.01116.16
7.3.260.0040.01516.17
7.3.250.0110.00716.21
7.3.240.0070.00716.20
7.3.230.0090.00516.22
7.3.220.0110.00416.16
7.3.210.0000.01616.24
7.3.200.0030.01216.29
7.3.190.0090.00616.15
7.3.180.0030.01016.21
7.3.170.0070.00716.14
7.3.160.0090.00616.20
7.3.150.0070.00716.21
7.3.140.0050.00816.14
7.3.130.0070.00716.17
7.3.120.0030.01016.21
7.3.110.0100.00316.18
7.3.100.0070.00716.15
7.3.90.0100.00616.50
7.3.80.0030.00916.22
7.3.70.0030.01416.27
7.3.60.0070.01016.47
7.3.50.0000.01816.38
7.3.40.0080.01116.42
7.3.30.0110.00316.38
7.3.20.0060.00916.43
7.3.10.0060.01316.28
7.3.00.0150.00416.30

preferences:
31.63 ms | 400 KiB | 5 Q