- function_exists: documentation ( source)
- array_key_last: documentation ( source)
- key: documentation ( source)
- next: documentation ( source)
<?php
$array = ["a" => "one", "b" => "two", "c" => "three"];
if (!function_exists("array_key_last")) {
echo "Please upgrade to php 7.3";
} else {
echo "First Key: " , key($array) , "\n";
echo "Last Key: " , array_key_last($array) , "\n";
next($array);
echo "Second Key: " , key($array) , "\n";
echo "Last Key: " , array_key_last($array);
}