note 106730 added to function.end

From: Date: Fri, 02 Dec 2011 06:24:48 +0000
Subject: note 106730 added to function.end
Groups: php.notes 
Request: Send a blank email to php-notes+get-184848@lists.php.net to get a copy of this message
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. ---- Server IP: 64.71.164.2 Probable Submitter: 173.58.49.41 ---- Manual Page -- http://www.php.net/manual/en/function.end.php Edit -- https://master.php.net/note/edit/106730 Del: integrated -- https://master.php.net/note/delete/106730/integrated Del: useless -- https://master.php.net/note/delete/106730/useless Del: bad code -- https://master.php.net/note/delete/106730/bad+code Del: spam -- https://master.php.net/note/delete/106730/spam Del: non-english -- https://master.php.net/note/delete/106730/non-english Del: in docs -- https://master.php.net/note/delete/106730/in+docs Del: other reasons-- https://master.php.net/note/delete/106730 Reject -- https://master.php.net/note/reject/106730 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184848) next »