3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [6 => 'a', -1 => 'b', 4 => 'c']; var_export( array_last($array) );
Output for 8.2.29, 8.3.5 - 8.3.25, 8.4.7 - 8.4.12
Fatal error: Uncaught Error: Call to undefined function array_last() in /in/1MEXH:6 Stack trace: #0 {main} thrown in /in/1MEXH on line 6
Process exited with code 255.

preferences:
41.26 ms | 406 KiB | 5 Q