Is it possible to type hint more than one type?
As of PHP 8.0, this will be possible with the inclusion of Union Types. The proposal has been voted 61 in favour to 5 against, and the implementation is ready to go. There was a previous RFC proposing this, mentioned in another answer, but that one ended up being rejected. It will work exactly as … Read more