PHP var_export() Function

PHP Variable Handling Reference : Output structured information about variables

Definition and Usage

The var_export() function outputs or returns structured information about a variable.

This function works similar to var_dump(), except that the returned value for this function is valid PHP code.

Syntax

var_export(variable, return);

Parameter Values

Parameter Description
variable Required. Specifies the variable to check
return Optional. If set to true, it returns the variable representation instead of outputting it

Technical Details

Return Value: If return is set to TRUE, it returns the variable representation. Otherwise, it returns NULL
Return Type: Mixed
PHP Version: 4.2+

❮ PHP Variable Handling Reference