PHP 클래스 think\Debug

파일 보기 프로젝트 열기: top-think/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$info 区间时间信息
$mem 区间内存信息

공개 메소드들

메소드 설명
dump ( mixed $var, boolean $echo = true, string $label = null, integer $flags = ENT_SUBSTITUTE ) : void | string 浏览器友好的变量输出
getFile ( boolean $detail = false ) : integer | array 获取文件加载信息
getMemPeak ( string $start, string $end, integer | string $dec = 2 ) : mixed 统计区间的内存峰值情况
getRangeMem ( string $start, string $end, integer | string $dec = 2 ) : string 记录区间的内存使用情况
getRangeTime ( string $start, string $end, integer | string $dec = 6 ) : integer 统计某个区间的时间(微秒)使用情况
getThroughputRate ( ) : string 获取当前访问的吞吐率情况
getUseMem ( integer | string $dec = 2 ) : string 统计从开始到统计时的内存使用情况
getUseTime ( integer | string $dec = 6 ) : integer 统计从开始到统计时的时间(微秒)使用情况
inject ( Response $response, &$content )
remark ( string $name, mixed $value = '' ) : mixed 记录时间(微秒)和内存使用情况

메소드 상세

dump() 공개 정적인 메소드

浏览器友好的变量输出
public static dump ( mixed $var, boolean $echo = true, string $label = null, integer $flags = ENT_SUBSTITUTE ) : void | string
$var mixed 变量
$echo boolean 是否输出 默认为true 如果为false 则返回输出字符串
$label string 标签 默认为空
$flags integer htmlspecialchars flags
리턴 void | string

getFile() 공개 정적인 메소드

获取文件加载信息
public static getFile ( boolean $detail = false ) : integer | array
$detail boolean 是否显示详细
리턴 integer | array

getMemPeak() 공개 정적인 메소드

统计区间的内存峰值情况
public static getMemPeak ( string $start, string $end, integer | string $dec = 2 ) : mixed
$start string 开始标签
$end string 结束标签
$dec integer | string 小数位
리턴 mixed

getRangeMem() 공개 정적인 메소드

记录区间的内存使用情况
public static getRangeMem ( string $start, string $end, integer | string $dec = 2 ) : string
$start string 开始标签
$end string 结束标签
$dec integer | string 小数位
리턴 string

getRangeTime() 공개 정적인 메소드

统计某个区间的时间(微秒)使用情况
public static getRangeTime ( string $start, string $end, integer | string $dec = 6 ) : integer
$start string 开始标签
$end string 结束标签
$dec integer | string 小数位
리턴 integer

getThroughputRate() 공개 정적인 메소드

获取当前访问的吞吐率情况
public static getThroughputRate ( ) : string
리턴 string

getUseMem() 공개 정적인 메소드

统计从开始到统计时的内存使用情况
public static getUseMem ( integer | string $dec = 2 ) : string
$dec integer | string 小数位
리턴 string

getUseTime() 공개 정적인 메소드

统计从开始到统计时的时间(微秒)使用情况
public static getUseTime ( integer | string $dec = 6 ) : integer
$dec integer | string 小数位
리턴 integer

inject() 공개 정적인 메소드

public static inject ( Response $response, &$content )
$response Response

remark() 공개 정적인 메소드

记录时间(微秒)和内存使用情况
public static remark ( string $name, mixed $value = '' ) : mixed
$name string 标记位置
$value mixed 标记值 留空则取当前 time 表示仅记录时间 否则同时记录时间和内存
리턴 mixed

프로퍼티 상세

$info 보호되어 있는 정적으로 프로퍼티

区间时间信息
protected static $info

$mem 보호되어 있는 정적으로 프로퍼티

区间内存信息
protected static $mem