3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum TestA { case A1; case A2; } enum TestB { case B1; case B2; } $value = TestB::B1; $out = $value instanceof TestB ? 'B' : 'A'; echo "{$out}";
Output for 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
B

preferences:
44.76 ms | 405 KiB | 5 Q