【发布时间】:2013-12-01 22:14:40
【问题描述】:
为什么如下
$a = new SplFixedArray(5);
$a[0] = array(1, 2, 3);
$a[0][0] = 12345; // here
var_dump($a);
生产
Notice: Indirect modification of overloaded element of SplFixedArray has no effect in <file> on line <indicated>
这是一个错误吗?那么你如何处理多维 SplFixedArrays 呢?有什么解决方法吗?
【问题讨论】:
-
@hek2mgl 你能想到任何解决方法吗?
-
我还在工作。认为需要一些时间才能找到解决方法。稍后(~1小时)会在这里看看
-
@NabinKunwar PHP 是 5.5