end() 与 count($array)-1 的区别
<?php
//end() 与 count($array)-1 的区别
$filename = 'a.b.c.jpg';
$array = explode('.', $filename);
echo end($array);
echo $array[count($array)-1];
$array = ['id' => 1, 'username' => 'tom'];
echo end($array);
echo count($array);
echo $array[count($array)-1];