I also suggest when type-hinting, if the type is integer or string where an enum is expected, PHP attempts a cast before failing, to make this more convenient.
O, and if this cast (or any cast to enum) fails, IMHO, it should replace it with null. When type-hinting, this means that if null is an acceptable value, execution can continue. If not, error, same as if something of a non-scalar non-matching type is passed, consistent with object type hints. Ben. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php