3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->id = 17; $a->res_id = 10; $a->cat_id = 3; $b = new stdClass(); $b->id = 18; $b->res_id = 10; $b->cat_id = 4; $c = new stdClass(); $c->id = 52; $c->res_id = 19; $c->cat_id = 1; $d = new stdClass(); $d->id = 53; $d->res_id = 19; $d->cat_id = 3; $e = new stdClass(); $e->id = 54; $e->res_id = 19; $e->cat_id = 4; $array = Array ( $a, $b, $c, $d, $e ); $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.3.60.0090.00618.30
8.3.50.0120.00318.38
8.3.40.0070.01418.67
8.3.30.0070.00718.80
8.3.20.0000.00721.73
8.3.10.0000.00721.80
8.3.00.0030.00519.79
8.2.180.0140.00716.50
8.2.170.0040.01822.96
8.2.160.0100.01022.05
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0080.00019.24
8.2.120.0090.00026.35
8.2.110.0060.00320.99
8.2.100.0080.00317.78
8.2.90.0030.00617.91
8.2.80.0000.00818.28
8.2.70.0050.00317.80
8.2.60.0040.00417.90
8.2.50.0070.00318.10
8.2.40.0030.00520.44
8.2.30.0040.00419.27
8.2.20.0050.00318.00
8.2.10.0040.00417.96
8.2.00.0040.00418.05
8.1.280.0150.00625.92
8.1.270.0000.00823.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.55
8.1.230.0080.00420.85
8.1.220.0000.00917.78
8.1.210.0040.00818.77
8.1.200.0040.00417.38
8.1.190.0060.00317.35
8.1.180.0060.00318.10
8.1.170.0000.00818.66
8.1.160.0030.00618.83
8.1.150.0040.00419.05
8.1.140.0040.00417.78
8.1.130.0030.00520.23
8.1.120.0000.00717.54
8.1.110.0040.00417.48
8.1.100.0030.00517.52
8.1.90.0040.00417.46
8.1.80.0000.00817.38
8.1.70.0000.00717.48
8.1.60.0030.00717.63
8.1.50.0040.00417.46
8.1.40.0060.00317.43
8.1.30.0040.00417.62
8.1.20.0040.00417.73
8.1.10.0040.00417.59
8.1.00.0040.00417.43
8.0.300.0030.00620.07
8.0.290.0040.00416.75
8.0.280.0080.00018.47
8.0.270.0000.00717.20
8.0.260.0030.00318.59
8.0.250.0030.00317.02
8.0.240.0050.00217.00
8.0.230.0000.00717.01
8.0.220.0030.00316.80
8.0.210.0030.00316.86
8.0.200.0000.00816.98
8.0.190.0000.00816.94
8.0.180.0070.00016.95
8.0.170.0000.00916.94
8.0.160.0000.00716.81
8.0.150.0040.00416.93
8.0.140.0040.00416.77
8.0.130.0000.00613.27
8.0.120.0030.00516.90
8.0.110.0060.00316.90
8.0.100.0040.00416.92
8.0.90.0000.00816.94
8.0.80.0060.00916.87
8.0.70.0040.00416.78
8.0.60.0040.00416.82
8.0.50.0000.00816.77
8.0.30.0100.00817.08
8.0.20.0100.00817.40
8.0.10.0070.00017.02
8.0.00.0060.01116.83
7.4.330.0040.00015.55
7.4.320.0030.00316.63
7.4.300.0030.00316.44
7.4.290.0040.00416.53
7.4.280.0000.00816.52
7.4.270.0000.00716.61
7.4.260.0000.00716.66
7.4.250.0030.00316.49
7.4.240.0000.00716.39
7.4.230.0000.00716.46
7.4.220.0000.00816.63
7.4.210.0080.01216.60
7.4.200.0030.00316.71
7.4.160.0080.00816.54
7.4.140.0090.01217.86
7.4.130.0100.00716.41
7.4.120.0100.00816.55
7.4.110.0100.01016.69
7.4.100.0120.00616.40
7.4.90.0110.00616.37
7.4.80.0120.00619.39
7.4.70.0170.00016.57
7.4.60.0040.01216.55
7.4.50.0040.01516.66
7.4.40.0070.01016.59
7.4.00.0040.00814.86
7.3.330.0000.00513.11
7.3.320.0030.00313.14
7.3.310.0070.00016.28
7.3.300.0070.00016.31
7.3.290.0070.00016.34
7.3.280.0030.01716.34
7.3.260.0090.01116.38
7.3.240.0090.01016.47
7.3.230.0130.01016.24
7.3.210.0080.01516.37
7.3.200.0070.01016.28
7.3.190.0060.01116.36
7.3.180.0150.00616.42
7.3.170.0080.00816.46
7.3.160.0100.01216.50
7.2.330.0220.00316.43
7.2.320.0130.00916.64
7.2.310.0060.01416.54
7.2.300.0130.00316.34
7.2.290.0110.00816.41
7.2.60.0160.00317.02
7.2.40.1880.01117.71
7.2.30.2160.01317.87
7.2.20.4320.01217.84
7.2.10.2040.01617.75
7.2.00.1810.01317.78
7.1.200.0040.01115.93
7.1.160.1860.01116.47
7.1.150.2370.01517.08
7.1.140.2230.01016.65
7.1.130.2590.01216.80
7.1.120.2320.01216.39
7.1.110.2560.01016.05
7.1.100.2440.01715.98
7.1.90.2670.01616.00
7.1.80.2950.01215.75
7.1.70.3050.01415.30
7.1.60.2770.01633.23
7.1.50.3390.01733.13
7.1.40.3310.02032.68
7.1.30.3930.01332.60
7.1.20.3190.01432.93
7.1.10.2960.01414.67
7.1.00.2640.01314.76

preferences:
55.97 ms | 401 KiB | 5 Q