note 106730 deleted from function.end by danbrown
| From: | danbrown@php.net | Date: | Fri, 02 Dec 2011 16:05:03 +0000 |
| Subject: | note 106730 deleted from function.end by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184859@lists.php.net to get a copy of this message | ||
Note Submitter: digitalprecision at gmail dot com
----
Regarding Tim C's note about using array_pop as the 'correct' method for extracting
the final element in an array is misleading. array_pop will return you the final element of the
array, but will also alter the source array by removing the final element, end() will simply return
the final element without affecting the source array.