<?php
class EnumOne extends SplEnum
{
const __default = 1;
}
class EnumTwo extends SplEnum
{
const __default = 2;
}
class EnumThree extends SplEnum
{
const __default = 3;
}
$enumOne = new EnumOne();
$enumTwo = new EnumTwo();
$enumThree = new EnumThree();
echo 'Enum one : ' . $enumOne . PHP_EOL;
echo 'Enum two : ' . $enumTwo . PHP_EOL;
echo 'Enum three: ' . $enumThree . PHP_EOL;
?>
The above example will output:
Enum one : 1
Enum two : 2
Enum three: 3