← All built-ins / var_export()

var_export()

var_export(...$args): string

Parameters

NameTypeDescription
$vmixedvalue to export

Return value

String of HolyPHP code that would recreate the value.

Example

echo var_export([1, 2]);
array(1, 2)

See also

var_dump()print_r()serialize()