php 类静态变量 和 常量消耗内存及时间对比
摘要:在对类执行100w次循环后, 常量最快,变量其次,静态变量消耗时间最高其中:常量消耗:101.1739毫秒变量消耗:2039.7689毫秒静态变量消耗:4084.8911毫秒测试代码:class Timer_profiler { public static $begin_timer; public static $finish_timer; public static $timer_html; /** * 计算时间差 * @return type */ public static function getRecordTimer() { ...
阅读全文
posted @ 2013-11-07 13:31
浙公网安备 33010602011771号