Voting

: one plus five?
(Example: nine)

The Note You're Voting On

Dean
9 years ago
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.

<< Back to user notes page

To Top