“Indirect modification of overloaded element of SplFixedArray has no effect”
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 on line Is it a bug? How do you deal with multidimensional SplFixedArrays then? Any workarounds? 回答1: First, the problem is related to all classes which implement ArrayAccess it is not a special problem of SplFixedArray only. When you accessing elements from SplFixedArray using the [] operator it behaves not