- var_dump: documentation ( source)
<?php
enum MyEnum: string
{
case value = 'value';
}
$object = new \stdClass();
$enum = MyEnum::value;
$payload = 'payload';
$map = new \SplObjectStorage();
$map[$object] = $payload;
$map[$enum] = $payload;
foreach ($map as $key => $value) {
var_dump($key, $value);
}