Organizational Research By

Surprising Reserch Topic

indirect modification of overloaded element of splfixedarray has no effect using -'php,arrays,spl'


indirect modification of overloaded element of splfixedarray has no effect  using -'php,arrays,spl'

Why the following

$a = new SplFixedArray(5);
$a[0] = array(1, 2, 3);
$a[0][0] = 12345; // here
var_dump($a);


produces

Notice: Indirect modification of overloaded element of SplFixedArray has no effect in <file> on line <indicated>


Is it a bug? How do you deal with multidimensional SplFixedArrays then? Any workarounds?
    
asked Sep 7, 2015 by rajesh
0 votes
27 views



Related Hot Questions



Government Jobs Opening


...