1.
$arr = array();
$arr[] = '';
2.
$arr = array();
array_push($arr,'');
I just did a 100,000-time loop insertion, and the result is that the first method is still faster! (Inserting numbers in a loop, 100,000 times, the first type is about 0.04 seconds, the second type is about 0.08 seconds)
http://www.bkjia.com/PHPjc/321081.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321081.htmlTechArticle1. $arr = array(); $arr[] = ''; 2. $arr = array( ); array_push($arr,''); I just did a 100,000-time loop insertion, and the result is that the first method is faster! (Loop to insert numbers, 100,000 times,...