Last active
December 13, 2016 07:40
-
-
Save takuya/07dad3119414d287739a83ff315208a3 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
<?php | |
$cnt = 10000; | |
$st = microtime(true); | |
foreach( range(0, $cnt) as $idx ){ | |
$list = range(0,1000); | |
$list = array_map( function($e){ return strtotime("+$e day"); }, $list ); | |
$list = array_map( function($e){ return date("Y-m-d", $e); }, $list ); | |
$list = array_filter( $list, function( $e ){return preg_match('/-03-/', $e);} ); | |
} | |
$time = microtime(true) - $st; | |
echo "multiple-loop : $time \n"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment