note 118463 added to function.list

From: Date: Thu, 10 Dec 2015 19:20:49 +0000
Subject: note 118463 added to function.list
Groups: php.notes 
Request: Send a blank email to php-notes+get-204322@lists.php.net to get a copy of this message
UNDOCUMENTED BEHAVIOR: list($a,$b,$c) = null; in fact works like: $a = null; $b = null; $c = null; ...So correspondingly: list($rows[]) = null; Will increment count($rows), just as if you had executed $rows[] = null; Watch out for this (for example) when retrieving entire tables from a database, e.g. while (list($rows[]) = $mysqlresult->fetch_row()); This will leave an extra 'null' entry as the last element of $rows. ---- Server IP: 27.50.85.3 Probable Submitter: 124.170.0.254 ---- Manual Page -- http://php.net/manual/en/function.list.php Edit -- https://master.php.net/note/edit/118463 Del: integrated -- https://master.php.net/note/delete/118463/integrated Del: useless -- https://master.php.net/note/delete/118463/useless Del: bad code -- https://master.php.net/note/delete/118463/bad+code Del: spam -- https://master.php.net/note/delete/118463/spam Del: non-english -- https://master.php.net/note/delete/118463/non-english Del: in docs -- https://master.php.net/note/delete/118463/in+docs Del: other reasons-- https://master.php.net/note/delete/118463 Reject -- https://master.php.net/note/reject/118463 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204322) next »