企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Class Phalcon\\Debug\\Dump # Class **Phalcon\\Debug\\Dump** Dumps information about a variable(s) ``` <pre class="calibre14">``` <?php $foo = 123; echo (new \Phalcon\Debug\Dump())->variable($foo, "foo"); ``` ``` ``` <pre class="calibre14">``` <?php $foo = "string"; $bar = ["key" => "value"]; $baz = new stdClass(); echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz); ``` ``` ### Methods public **getDetailed** () ... public **setDetailed** (*unknown* $detailed) ... public **\_\_construct** (\[*unknown* $styles\], \[*unknown* $detailed\]) Phalcon\\Debug\\Dump constructor public **all** () Alias of variables() method protected **getStyle** (*unknown* $type) Get style for type public **setStyles** (\[*unknown* $styles\]) Set styles for vars type public **one** (*unknown* $variable, \[*unknown* $name\]) Alias of variable() method protected **output** (*unknown* $variable, \[*unknown* $name\], \[*unknown* $tab\]) Prepare an HTML string of information about a single variable. public **variable** (*unknown* $variable, \[*unknown* $name\]) Returns an HTML string of information about a single variable. ``` <pre class="calibre14">``` <?php echo (new \Phalcon\Debug\Dump())->variable($foo, "foo"); ``` ``` public **variables** () Returns an HTML string of debugging information about any number of variables, each wrapped in a “pre” tag. ``` <pre class="calibre14">``` <?php $foo = "string"; $bar = ["key" => "value"]; $baz = new stdClass(); echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz); ``` ``` public **toJson** (*mixed* $variable) Returns an JSON string of information about a single variable. ``` <pre class="calibre14">``` <?php $foo = ["key" => "value"]; echo (new \Phalcon\Debug\Dump())->toJson($foo); $foo = new stdClass(); $foo->bar = 'buz'; echo (new \Phalcon\Debug\Dump())->toJson($foo); ``` ``` | - [索引](# "总目录") - [下一页](# "Class Phalcon\Debug\Exception") | - [上一页](# "Class Phalcon\Debug") | - [API Indice](#) »