# VarStorable

The VarStorable component is in charge of handling a storable variable.

VarStorableInterface describes the interface for the component in charge of defining a VarStorable.

# Storable variables

A storable variable for Chevere is any PHP variable that can be stored as a string representation. Almost all variable types can be stored, except type resource.

# Creating VarStorable

use Chevere\Components\VarStorable\VarStorable;

$varStorable = new VarStorable($var);

# Export

The toExport method provides a shortcut for var_export($var, true).

 * @var string $export
$export = $varStorable->toExport();

# Serialize

The toSerialize method provides a shortcut for serialize($var).

 * @var string $serialize
$serialize = $varStorable->toSerialize();