# VarStorable

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

# Storable variables

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

# Creating VarStorable

use Chevere\Components\VarStorable\VarStorable;

$varStorable = new VarStorable(var: $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();