note 101193 added to function.end

From: Date: Wed, 01 Dec 2010 23:06:00 +0000
Subject: note 101193 added to function.end
Groups: php.notes 
Request: Send a blank email to php-notes+get-174533@lists.php.net to get a copy of this message
It's interesting to note that when creating an array with numeric keys in no particular order, end() will still only return the value that was the last one to be created. So, if you have something like this: <?php $a = array(); $a[1] = 1; $a[0] = 0; echo end($a); This will print "0". ---- Server IP: 212.124.37.9 Probable Submitter: 141.89.89.123 ---- Manual Page -- http://www.php.net/manual/en/function.end.php Edit -- https://master.php.net/note/edit/101193 Del: integrated -- https://master.php.net/note/delete/101193/integrated Del: useless -- https://master.php.net/note/delete/101193/useless Del: bad code -- https://master.php.net/note/delete/101193/bad+code Del: spam -- https://master.php.net/note/delete/101193/spam Del: non-english -- https://master.php.net/note/delete/101193/non-english Del: in docs -- https://master.php.net/note/delete/101193/in+docs Del: other reasons-- https://master.php.net/note/delete/101193 Reject -- https://master.php.net/note/reject/101193 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174533) next »