- var_dump: documentation ( source)
- serialize: documentation ( source)
<?php
class EnumConstantMetadata
{
private $name;
private $readableValue;
private $value;
public function __construct($name, $value, $readableValue)
{
$this->name = $name;
$this->value = $value;
$this->readableValue = $readableValue;
}
public function getName()
{
return $this->name;
}
public function getReadableValue()
{
return $this->readableValue;
}
public function getValue()
{
return $this->value;
}
}
var_dump(serialize(new EnumConstantMetadata('name', 'value', 'readableValue')));
var_dump(serialize(array('name', 'value', 'readableValue')));