3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(get_catering_posts()); function get_catering_posts() { // For each category in the Catering category, fetch their posts return array_map(function ($category) { $category->posts = array_map(function (&$post) use ($category) { // Filter only the custom fields we need to render the page $post->custom_fields = array_filter(get_post_custom($post->ID), function ($item, $item_key) { return in_array($item_key, array( 'price', 'price_portion', 'serving', 'minimum_order', )); }, ARRAY_FILTER_USE_BOTH); return $post; }, get_posts(array( 'category' => $category->cat_ID, ))); return $category; }, get_categories(array( 'child_of' => 16, ))); } function get_posts($array) { return array( 0 => new stdClass, 1 => new stdClass, ); } function get_categories($array) { return array( 0 => new stdClass, 1 => new stdClass, ); } function get_post_custom($id) { return array( 'price' => 'price', 'price_portion' => 'price_portion', 'serving' => 'serving', 'minimum_order' => 'minimum_order', ); }

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.0150.00018.68
8.3.50.0140.01021.99
8.3.40.0130.00918.60
8.3.30.0110.00418.77
8.3.20.0040.00420.27
8.3.10.0030.00523.66
8.3.00.0080.00019.50
8.2.180.0040.01818.18
8.2.170.0090.00622.96
8.2.160.0100.00520.53
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0050.00517.50
8.2.120.0050.00326.35
8.2.110.0030.00621.00
8.2.100.0130.00017.75
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0080.00019.39
8.2.30.0050.00220.52
8.2.20.0090.00017.76
8.2.10.0040.00418.13
8.2.00.0000.00718.13
8.1.280.0180.00325.92
8.1.270.0090.00023.84
8.1.260.0050.00228.09
8.1.250.0080.00028.09
8.1.240.0100.00023.97
8.1.230.0120.00017.96
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0050.00318.76
8.1.160.0030.00521.94
8.1.150.0070.00018.90
8.1.140.0080.00019.51
8.1.130.0000.00717.72
8.1.120.0040.00417.49
8.1.110.0070.00017.45
8.1.100.0050.00317.40
8.1.90.0040.00417.48
8.1.80.0030.00617.45
8.1.70.0030.00317.44
8.1.60.0000.00917.61
8.1.50.0030.00617.59
8.1.40.0030.00617.43
8.1.30.0050.00517.66
8.1.20.0000.00817.58
8.1.10.0050.00317.58
8.1.00.0040.00417.41
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.42
8.0.270.0000.00816.77
8.0.260.0000.00817.19
8.0.250.0030.00517.04
8.0.240.0080.00017.04
8.0.230.0040.00816.93
8.0.220.0080.00016.81
8.0.210.0040.00416.88
8.0.200.0000.00716.85
8.0.190.0040.00417.05
8.0.180.0020.00516.98
8.0.170.0050.00216.83
8.0.160.0040.00416.94
8.0.150.0040.00416.83
8.0.140.0000.00716.82
8.0.130.0030.00613.32
8.0.120.0030.00516.79
8.0.110.0040.00416.86
8.0.100.0000.00716.72
8.0.90.0000.00816.76
8.0.80.0060.01316.96
8.0.70.0040.00416.97
8.0.60.0040.00416.91
8.0.50.0000.00716.79
8.0.30.0060.01317.00
8.0.20.0100.01017.40
8.0.10.0040.00417.14
8.0.00.0100.01016.88
7.4.330.0000.00616.79
7.4.320.0000.00616.37
7.4.300.0030.00316.55
7.4.290.0030.00316.45
7.4.280.0000.00816.47
7.4.270.0000.00716.57
7.4.260.0060.00316.45
7.4.250.0040.00416.39
7.4.240.0050.00216.50
7.4.230.0000.00816.35
7.4.220.0150.01116.49
7.4.210.0120.00716.47
7.4.200.0040.00416.29
7.4.160.0130.01016.52
7.4.150.0100.01017.40
7.4.140.0120.01017.86
7.4.130.0110.00716.48
7.4.120.0130.01016.43
7.4.110.0060.01316.62
7.4.100.0070.01316.60
7.4.90.0110.00716.64
7.4.80.0070.01019.39
7.4.70.0170.00816.45
7.4.60.0130.00316.73
7.4.50.0030.01316.61
7.4.40.0080.01116.62
7.4.30.0060.01216.73
7.4.00.0100.00715.08
7.3.330.0000.00513.40
7.3.320.0030.00313.43
7.3.310.0080.00016.43
7.3.300.0070.00016.32
7.3.290.0000.00716.34
7.3.280.0130.00816.45
7.3.270.0120.00617.40
7.3.260.0150.00316.67
7.3.250.0160.00516.56
7.3.240.0080.01216.65
7.3.230.0120.00616.54
7.3.210.0060.01216.51
7.3.200.0060.01616.73
7.3.190.0110.01116.50
7.3.180.0080.00816.42
7.3.170.0120.00616.57
7.3.160.0060.01116.60
7.3.10.0030.01116.44
7.3.00.0100.00516.52
7.2.330.0090.00916.69
7.2.320.0060.01216.81
7.2.310.0130.00616.78
7.2.300.0070.01016.44
7.2.290.0130.01116.61
7.2.130.0070.00916.52
7.2.120.0050.01116.70
7.2.110.0090.01016.73
7.2.100.0110.00916.63
7.2.90.0140.00416.81
7.2.80.0080.00816.72
7.2.70.0090.00616.53
7.2.60.0090.00616.83
7.2.50.0110.00816.48
7.2.40.0080.00916.73
7.2.30.0110.00516.72
7.2.20.0160.00716.47
7.2.10.0130.01016.58
7.2.00.0060.00617.66
7.1.250.0090.00915.73
7.1.200.0060.00615.63
7.1.100.0760.00816.30
7.1.70.0070.01017.20
7.1.60.0100.01019.12
7.1.50.0300.01034.94
7.1.00.0030.07722.37
7.0.200.0070.00316.77
7.0.60.0100.05719.83
7.0.50.0070.04017.88
7.0.40.0130.07020.09
7.0.30.0430.07020.25
7.0.20.0230.08320.06
7.0.10.0030.04720.09
7.0.00.0170.08020.15
5.6.280.0070.05721.07
5.6.210.0170.05720.50
5.6.200.0070.08018.20
5.6.190.0000.04720.52
5.6.180.0430.07320.61
5.6.170.0200.07320.55
5.6.160.0170.03720.44
5.6.150.0100.07718.28
5.6.140.0030.04018.14
5.6.130.0030.08318.13
5.6.120.0030.09021.14
5.6.110.0070.05720.91
5.6.100.0030.06021.11
5.6.90.0000.07721.03
5.6.80.0030.08320.31
5.5.350.4170.04020.44
5.5.340.0000.04017.96
5.5.330.0070.08320.36
5.5.320.0000.04320.20
5.5.310.0270.06720.36
5.5.300.0000.04717.96
5.5.290.0100.07718.08
5.5.280.0000.05720.79
5.5.270.0030.04720.89
5.5.260.0100.03720.67
5.5.250.0100.08320.49
5.5.240.0170.05320.26

preferences:
56.29 ms | 401 KiB | 5 Q