Voting

: six plus one?
(Example: nine)

The Note You're Voting On

Colin Guthrie
9 years ago
If you want use the undefined behaviour as you might expect it e.g. if you want:

$b = ['a','b']; list($a, $b) = $b;

to result in $a=='a' and $b=='b', then you can just cast $b to an array (even although it already is) to create a copy. e.g.

$b = ['a','b']; list($a, $b) = (array)$b;

and get the expected results.

<< Back to user notes page

To Top