Last active
August 24, 2016 07:02
-
-
Save tomotomo/3ec47c9b665d74dd7c393f47421ee908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time php test01.php | |
real 0m0.213s | |
user 0m0.063s | |
sys 0m0.039s | |
$ time php test02.php | |
real 0m0.083s | |
user 0m0.050s | |
sys 0m0.020s | |
# ちなみにphp7.1の実行結果 | |
$ time php test01.php | |
real 0m0.291s | |
user 0m0.105s | |
sys 0m0.036s | |
$ time php test02.php | |
real 0m0.059s | |
user 0m0.031s | |
sys 0m0.014s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array(); | |
for ($i = 0; $i < 100000; $i++) { | |
array_push($array, $i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array(); | |
for ($i = 0; $i < 100000; $i++) { | |
$array[] = $i; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment