Dump7
v2.0.2
PHP var_dump의 예쁜 버전. 이 클래스는 유형 및 값을 포함하는 하나 이상의 표현식에 대한 구조화 된 정보를 표시합니다.
PHP 5+는 덤프 5를 확인하십시오
최신 릴리스 버전을 독립형으로 다운로드 할 수 있습니다. 또는 Composer를 사용할 수 있습니다.
composer require ghostff/dump7 "require" : {
"ghostff/dump7" : " ^1.0 "
}Doc 블록 플래그를 사용하여 간단한 숨기거나 일부 객체 속성을 표시 할 수 있습니다.
@dumpignore-inheritance | 상속 된 클래스 속성을 숨 깁니다. |
@dumpignore-inherited-class | 상속 된 속성에서 클래스 이름을 숨 깁니다. |
@dumpignore-private | 개인 속성을 제외한 모든 속성을 표시하십시오. |
@dumpignore-protected | 보호 된 속성을 제외한 모든 속성을 보여줍니다. |
@dumpignore-public | 공개 속성을 제외한 모든 속성을 보여줍니다. |
@dumpignore | DOC 주석이 속한 속성을 숨 깁니다. |
/**
* @dumpignore-inheritance
* @dumpignore-inherited-class
* @dumpignore-private
* @dumpignore-public
* @dumpignore-public
*/
Class Foo extends Bar {
/** @dumpignore */
private ? BigObject $ foo = null ;
} class FooBar
{
private $ inherited_int = 123 ;
private $ inherited_array = [ ' string ' ];
}
class Bar extends FooBar
{
private $ inherited_float = 0.22 ;
private $ inherited_bool = 1 == ' 1 ' ;
}
class Foo extends Bar
{
private $ string = ' string ' ;
protected $ int = 10 ;
public $ array = [
' foo ' => ' bar '
];
protected static $ bool = false ;
}
$ string = ' Foobar ' ;
$ array = [ ' foo ' , ' bar ' ];
$ int = 327626 ;
$ double = 22.223 ;
$ null = null ;
$ bool = true ;
$ resource = fopen ( ' LICENSE ' , ' r ' );
$ m = microtime ( true );
new Dump ( new Foo , $ string , $ array , $ int , $ double , $ null , $ bool , [
' foo ' => ' bar ' ,
' bar ' => ' foo ' ,
[
' foo ' => ' foobar ' ,
' bar_foo ' ,
2 => ' foo ' ,
' foo ' => [
' barbar ' => 55 ,
' foofoo ' => false ,
' foobar ' => null ,
]
]
], $ resource );
new Dump ( 1 == ' 1 ' , 1 === ' 1 ' );
Dump:: safe (... $ args ); # running on terminal without color capabilities .사전 정의 된 색상 교체 :
# set ($ name , [$ cgi_color , $ cli_color ]);
Dump:: set ( ' boolean ' , [ ' bb02ff ' , ' purple ' ]); 기본적으로 Dump 함수 내부에서 호출되면 호출 라인은 함수 호출 대신 함수 내부의 new Dump 로 설정됩니다. setTraceOffset 사용하면 각 호출 라인의 오프셋을 설정할 수 있습니다.
function dump ()
{
Dump:: setTraceOffset ( 2 );
new Dump (... func_get_args ()); # Dont use this test. php ( line : 4 ) as call line
}
dump ( ' foo ' , 22 , ' bar ' , true ); // Use test.php(line:7) insteadCGI 출력 :

CLI (UNIX) :

CLI (창) :
