array.pushとarr[]要素の追加速度
540 ワード
I've done a small comparison between array_push() and the $array[] method and the $array[] seems to be a lot faster.
takes 0.0622200965881 seconds
and
takes 1.63195490837 seconds
so if your not making use of the return value of array_push() its better to use the $array[] way.
takes 0.0622200965881 seconds
and
takes 1.63195490837 seconds
so if your not making use of the return value of array_push() its better to use the $array[] way.