Method Error.Generic()->cast() Method cast array cast(string type) Description Cast operator. Note The only supported type to cast to is "array", which generates an old-style error ({message(), backtrace()}).