Best way to initialize (empty) array in PHP

前端 未结 8 1639
悲&欢浪女
悲&欢浪女 2020-12-02 05:25

In certain other languages (AS3 for example), it has been noted that initializing a new array is faster if done like this var foo = [] rather than var foo

8条回答
  •  再見小時候
    2020-12-02 06:01

    Initializing a simple array :

    
    

    Initializing array within array :

    
    

    Source : Sorce for the code

提交回复
热议问题