Home > Backend Development > PHP Tutorial > array_push PHP array_push array function

array_push PHP array_push array function

WBOY
Release: 2016-07-29 08:41:32
Original
1405 people have browsed it

1.
$arr = array();
$arr[] = '';
2.
$arr = array();
array_push($arr,'');
Just did a 100000 times loop insertion, The result is that the first one is faster! (Loop to insert numbers, 100,000 times, the first type is about 0.04 seconds, the second type is about 0.08 seconds)

The above introduces the array_push PHP array_push array function, including the content of array_push. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template