function ExportUtil::export
Exports a value as a string
The output of this method is similar to the output of print_r(), but improved in various aspects:
- NULL is rendered as "null" (instead of "")
- TRUE is rendered as "true" (instead of "1")
- FALSE is rendered as "false" (instead of "")
- Strings are always quoted with single quotes
- Carriage returns and newlines are normalized to \n
- Recursion and repeated rendering is treated properly
Parameters
mixed $value:
int $indentation The indentation level of the 2nd+ line:
Return value
string
1 call to ExportUtil::export()
- StringUtil::stringify in vendor/
phpspec/ prophecy/ src/ Prophecy/ Util/ StringUtil.php - Stringifies any provided value.
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Util/ ExportUtil.php, line 40
Class
- ExportUtil
- This class is a modification from sebastianbergmann/exporter
Namespace
Prophecy\UtilCode
public static function export($value, $indentation = 0) {
return self::recursiveExport($value, $indentation);
}