3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum TestEnum { case A; } $true = true; $enum = TestEnum::A; var_dump( $enum == $true, $enum == true, (bool)$enum, );
Output for 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
bool(false) bool(true) bool(true)

preferences:
49.31 ms | 405 KiB | 5 Q