3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( '0' => (object)[ 'id' => 17, 'res_id' => 10, 'cat_id' => 3 ], '1' => (object)[ 'id' => 18, 'res_id' => 10, 'cat_id' => 4 ], '2' => (object)[ 'id' => 52, 'res_id' => 19, 'cat_id' => 1 ], '3' => (object)[ 'id' => 53, 'res_id' => 19, 'cat_id' => 3 ], '4' => (object)[ 'id' => 54, 'res_id' => 19, 'cat_id' => 4 ] ); $result = array_map(function($x){ return $x->cat_id; }, $array); print_r($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.5.10.0100.00716.80
8.5.00.0170.00721.89
8.4.160.0100.01123.95
8.4.150.0020.00014.05
8.4.140.0130.00917.73
8.4.130.0050.00417.54
8.4.120.0120.00720.74
8.4.110.0050.00419.18
8.4.100.0090.00518.84
8.4.90.0060.00320.60
8.4.80.0060.00218.88
8.4.70.0060.01020.54
8.4.60.0140.00620.52
8.4.50.0110.01020.04
8.4.40.0130.00719.72
8.4.30.0150.00619.41
8.4.20.0130.00618.03
8.4.10.0040.00418.03
8.3.280.0120.00918.69
8.3.270.0100.01116.86
8.3.260.0070.00116.72
8.3.250.0110.00817.28
8.3.240.0100.00916.86
8.3.230.0110.01016.54
8.3.220.0080.01018.99
8.3.210.0130.00616.85
8.3.200.0070.00216.69
8.3.190.0110.00517.22
8.3.180.0090.01119.07
8.3.170.0000.01417.08
8.3.160.0130.00618.60
8.3.150.0120.00617.11
8.3.140.0130.00616.43
8.3.130.0000.00816.88
8.3.120.0160.00020.52
8.3.110.0040.00720.94
8.3.100.0050.00324.06
8.3.90.0050.00326.77
8.3.80.0090.00018.68
8.3.70.0120.00316.50
8.3.60.0090.00618.52
8.3.50.0020.01118.29
8.3.40.0070.01418.63
8.3.30.0030.01318.85
8.3.20.0040.00421.71
8.3.10.0000.00821.86
8.3.00.0040.00419.56
8.2.290.0110.00718.82
8.2.280.0120.00720.41
8.2.270.0120.00316.86
8.2.260.0100.01017.29
8.2.250.0000.01216.79
8.2.240.0060.00318.86
8.2.230.0130.00322.58
8.2.220.0030.00637.54
8.2.210.0050.00326.77
8.2.200.0090.00016.75
8.2.190.0160.00016.62
8.2.180.0110.00718.29
8.2.170.0060.00822.96
8.2.160.0070.00720.94
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0000.00819.27
8.2.120.0000.00726.35
8.2.110.0090.00019.29
8.2.100.0090.00317.97
8.2.90.0060.00319.35
8.2.80.0070.00417.97
8.2.70.0040.00417.75
8.2.60.0000.00817.75
8.2.50.0030.00619.48
8.2.40.0050.00519.61
8.2.30.0000.00819.24
8.2.20.0000.00718.05
8.2.10.0040.00418.13
8.2.00.0050.00218.00
8.1.330.0120.00716.16
8.1.320.0080.01216.23
8.1.310.0040.01516.77
8.1.300.0000.01016.35
8.1.290.0070.00330.84
8.1.280.0120.00325.92
8.1.270.0040.00423.64
8.1.260.0030.01226.35
8.1.250.0000.00828.09
8.1.240.0030.00619.23
8.1.230.0000.01117.83
8.1.220.0060.00317.91
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00717.62
8.1.160.0070.00018.90
8.1.150.0040.00420.84
8.1.140.0000.00717.65
8.1.130.0060.00317.55
8.1.120.0040.00417.54
8.1.110.0070.00017.49
8.1.100.0080.00017.47
8.1.90.0080.00017.47
8.1.80.0000.00717.47
8.1.70.0040.00417.50
8.1.60.0000.00917.52
8.1.50.0000.00817.43
8.1.40.0040.00417.56
8.1.30.0030.00617.72
8.1.20.0050.00217.65
8.1.10.0030.00517.43
8.1.00.0000.00917.37
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0060.00018.43
8.0.270.0050.00316.82
8.0.260.0000.00716.72
8.0.250.0090.00016.92
8.0.240.0030.00316.85
8.0.230.0030.00316.93
8.0.220.0070.00016.78
8.0.210.0030.00516.80
8.0.200.0030.00316.98
8.0.190.0000.00716.89
8.0.180.0000.00716.87
8.0.170.0030.00617.01
8.0.160.0000.00716.84
8.0.150.0040.00416.91
8.0.140.0070.00016.76
8.0.130.0000.00613.34
8.0.120.0050.00316.82
8.0.110.0040.00416.94
8.0.100.0000.00816.95
8.0.90.0040.00416.78
8.0.80.0150.00616.87
8.0.70.0040.00416.82
8.0.60.0070.00017.00
8.0.50.0040.00416.98
8.0.30.0110.00717.05
8.0.20.0130.00617.40
8.0.10.0000.00716.96
8.0.00.0160.00616.73
7.4.330.0000.00515.55
7.4.320.0060.00016.65
7.4.300.0000.00616.43
7.4.290.0030.00316.52
7.4.280.0050.00316.51
7.4.270.0050.00316.61
7.4.260.0000.00716.47
7.4.250.0040.00416.46
7.4.240.0080.00016.60
7.4.230.0070.00016.54
7.4.220.0050.00316.52
7.4.210.0070.01216.56
7.4.200.0040.00416.50
7.4.160.0090.00716.47
7.4.140.0090.00917.86
7.4.130.0090.00916.53
7.4.120.0090.00916.44
7.4.110.0070.01016.52
7.4.100.0070.01516.46
7.4.90.0100.00616.47
7.4.80.0190.00619.39
7.4.70.0070.00916.38
7.4.60.0060.01016.51
7.4.50.0020.01216.52
7.4.40.0100.01316.45
7.4.00.0130.00315.04
7.3.330.0000.00613.12
7.3.320.0050.00013.33
7.3.310.0040.00416.16
7.3.300.0070.00016.34
7.3.290.0030.00316.28
7.3.280.0070.01316.21
7.3.260.0150.00616.42
7.3.240.0070.01116.30
7.3.230.0060.01216.66
7.3.210.0120.00916.26
7.3.200.0060.01016.20
7.3.190.0000.01616.61
7.3.180.0090.00916.12
7.3.170.0030.02016.28
7.3.160.0070.01316.49
7.2.330.0150.00316.76
7.2.320.0160.01016.52
7.2.310.0070.01416.54
7.2.300.0030.01416.60
7.2.290.0200.00416.41
7.2.60.0070.00716.50
7.2.40.0980.01417.47
7.2.30.0810.01117.75
7.2.20.0920.01217.99
7.2.10.1250.01817.88
7.2.00.0960.01017.73
7.1.200.0080.00315.79
7.1.160.1180.01116.51
7.1.150.0930.01016.88
7.1.140.0940.01116.93
7.1.130.0850.01516.75
7.1.120.0800.01116.56
7.1.110.0500.01116.49
7.1.100.0580.00715.97
7.1.90.0740.00716.12
7.1.80.0530.01115.97
7.1.70.0590.00815.34
7.1.60.0690.01633.29
7.1.50.0700.01233.05
7.1.40.1240.01532.55
7.1.30.0870.01032.52
7.1.20.0890.01332.53
7.1.10.0930.01014.75
7.1.00.1170.01214.98

preferences:
162.67 ms | 403 KiB | 5 Q