PHP array_push 数组函数_PHP

WBOY
Release: 2016-06-01 12:22:29
Original
819 people have browsed it

1.
$arr = array();
$arr[] = '';
2.
$arr = array();
array_push($arr,'');

刚做一个100000次的循环插入,结果还是第一种要快一些!(循环插入数字,100000次,第一种0.04左右,第二种0.08秒左右)

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!