3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "channel": { "id": "xxxxxxx", "field1": "A", "created_at": "2021-06-16T19:06:15+07:00", "updated_at": "2021-06-16T19:09:58+07:00", "last_entry_id": 459 }, "feeds": [ { "created_at": "2021-06-19T07:00:11+07:00", "entry_id": 1, "field1": "26.51" }, { "created_at": "2021-06-19T07:00:26+07:00", "entry_id": 2, "field1": "26.78" }, { "created_at": "2021-06-19T07:00:56+07:00", "entry_id": 3, "field1": "26.81" } ] }'; $feeds = json_decode($json, true)['feeds']; usort($feeds, function($a, $b) { return $b['field1'] <=> $a['field1']; }); $last = array_slice($feeds, -1)[0]; printf( 'max : %.2f %s - min: %.2f %s', round($feeds[0]['field1'], 2), $feeds[0]['created_at'], round($last['field1'], 2), $last['created_at'] );
Output for git.master, git.master_jit, rfc.property-hooks
max : 26.81 2021-06-19T07:00:56+07:00 - min: 26.51 2021-06-19T07:00:11+07:00

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
26.57 ms | 405 KiB | 5 Q