21,893
社区成员




require_once('./classes/core.php');
$my = new Core();
$test = range(1,9999);
$test[] = "lt's your bag!";
/**
* 直接使用foreach,运行时间为0.18575
*/
foreach ($test as $v)
{
$b[] = addslashes($v);
}
/**
* 使用array_map时,运行时间为0.03270
*/
//$b = array_map('addslashes', $test);
echo $my->runTime() . '<br>';
echo count($b) . '<br>';
echo $b[count($b)-1];