Function __global->var_export

Definitions

sources_custom/phpstub.php

  • Outputs or returns a parsable string representation of a variable.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$expression mixed No No required parameter N/A N/A The variable you want to export
$return boolean No No False N/A N/A If used and set to TRUE, var_export() will return the variable representation instead of outputting it

Returns

  • Variable representation (null: asked to not return a value)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Outputs or returns a parsable string representation of a variable.
 *
 * @param  mixed $expression The variable you want to export
 * @param  boolean $return If used and set to TRUE, var_export() will return the variable representation instead of outputting it
 * @return ?string Variable representation (null: asked to not return a value)
 */

function var_export($expression, bool $return = false) : ?string