3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ ['food' => 'banana', 'count' => 43], ['food' => 'cheese strings', 'count' => 5], ['food' => 'bananas', 'count' => 3], ['food' => 'tea towle', 'count' => 2], ]; $firstRow = reset($data); $lastRow = end($data); var_dump($firstRow, $lastRow);

preferences:
23.55 ms | 406 KiB | 5 Q