There is another Polyfill for PHP < 8.5
<?php
if (!function_exists("array_first")) {
function array_first(array $array) {
if (!empty($array)) return current(array_slice($array, 0, 1));
return null;
}
}
?>There is another Polyfill for PHP < 8.5
<?php
if (!function_exists("array_first")) {
function array_first(array $array) {
if (!empty($array)) return current(array_slice($array, 0, 1));
return null;
}
}
?>