3v4l.org

run code in 300+ PHP versions simultaneously
<?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); }

preferences:
31.61 ms | 407 KiB | 5 Q