<?php header('Content-type: text/html; charset=utf8'); function current_time(){ list( $usec ,$sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } class Test{ public $var = "123"; public function __get($varname){ return $this->var; } } $start = current_time(); $i = 0; while ($i<10000) { $i++; $test = new Test(); $test->var; } $end = current_time(); echo "Lost Time: ". number_format($end - $start,3)*1000; echo "\n"; ?>
跌落尘层的王者
2014-10-19
0 回答
举报
0/150
提交
取消