--TEST-- Enum types as parameters --FILE-- getMessage() . "\n"; } try { takesFoo(Baz::Qux); } catch (Error $e) { echo $e->getMessage() . "\n"; } ?> --EXPECTF-- takesBaz(): Argument #1 ($baz) must be of type Baz, Foo given, called in %s on line %d takesFoo(): Argument #1 ($foo) must be of type Foo, Baz given, called in %s on line %d