Attempting to get the value of a key from an empty array through end() will result in NULL instead of throwing an error or warning becuse end() on an empty array results in false:
<?php
$a = ['a' => ['hello' => 'a1','world' => 'a2'],
'b' => ['hello' => 'b1','world' => 'b2'],
'c' => ['hello' => 'c1','world' => 'c2']
];
$b = [];
var_dump(end($a)['hello']);
var_dump(end($b)['hello']);
var_dump(false['hello']);
?>
Results in:
string(2) "c1"
NULL
NULL