var_export输出或返回一个变量的字符串表示

var_export - 输出或返回一个变量的字符串表示。

mixed var_export ( mixed $expression [, bool $return ] )

此函数返回关于传递给该函数的变量的结构信息,它和 var_dump() 类似,不同的是其返回的表示是合法的 PHP 代码。

您可以通过将函数的第二个参数设置为 TRUE,从而返回变量的表示。

$a = array (1, 2, array ("a", "b", "c"));

var_export ($a);

原文

http://www.php.net/manual/zh/function.var-export.php

原文地址:https://www.cnblogs.com/mydomain/p/3036912.html