- Output for 8.1.0 - 8.1.17, 8.2.0 - 8.2.4
- bool(true) enum(IntervalBoundary::ClosedOpen)
- Output for 8.0.1 - 8.0.28
- Parse error: syntax error, unexpected identifier "IntervalBoundary" in /in/tT0Ho on line 3
Process exited with code 255.
<?php
enum IntervalBoundary {
case ClosedOpen;
case ClosedClosed;
case OpenClosed;
case OpenOpen;
public const Fastest = self::ClosedOpen;
}
var_dump(IntervalBoundary::ClosedOpen === IntervalBoundary::Fastest);
function foo(IntervalBoundary $b) {
var_dump($b);
}
foo(IntervalBoundary::Fastest);