查看“性能”的源代码
←
性能
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看并复制此页面的源代码:
[[PHP提高编程效率的方法]] [[file_get_contents的超时处理]] [[10个PHP高级应用技巧]] [[一次php应用的优化实践]] ==引用与传值,性能比较== <source lang="php"> $param = [ 'something', 'about', 'nothing', 'something', 'about', 'nothing', 'something', 'about', 'nothing', 'something', 'about', 'nothing', 'something', 'about', 'nothing' ]; $max = 10000; $begin = time_ms(); for ($n = 0; $n < $max; $n++) { $this->ref($param); } $time_ref = time_ms(); echo '<p>ref: ' . ($time_ref - $begin); for ($j = 0; $j < $max; $j++) { $this->val($param); } $time_val = time_ms(); echo '<p>val: ' . ($time_val - $time_ref); </source> 输出: ref: 36 val: 18 '''引用更耗时'''
返回
性能
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息