Commit 2b26dd32 by Qiang Xue

Improved doc [skip ci]

parent 2188da0c
...@@ -127,11 +127,18 @@ class BaseVarDumper ...@@ -127,11 +127,18 @@ class BaseVarDumper
} }
/** /**
* Returns a parsable string representation of a variable. * Exports a variable as a string representation.
* This method achieves the similar functionality as var_export *
* but is more robust when handling arrays and objects. * The string is a valid PHP expression that can be evaluated by PHP parser
* @param mixed $var variable to be exported. * and the evaluation result will give back the variable value.
* @return string parsable string representation of a variable. *
* This method is similar to `var_export()`. The main difference is that
* it generates more compact string representation using short array syntax.
*
* PHP 5.4 or above is required to parse the exported value.
*
* @param mixed $var the variable to be exported.
* @return string a string representation of the variable
*/ */
public static function export($var) public static function export($var)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment