


You can do this manually in settings under Languages & Frameworks | PHP | PHP language level.

To see all the features, you need to switch the language version to PHP 8. Union types have long been used in PHPDoc tags, but now they will really be checked in runtime by the interpreter itself. In this case, a variable can accept any of the listed types. can be used wherever types can currently be specified: arguments, properties, or return values. We’ve started to roll out support for version 8 early, and the first big feature is union types. PHP 8 will have so many new features that to some extent you can almost call it a new language. Read on to check out all the new features and significant updates, along with a ton of GIFs! This major release includes support for PHP 8 Union Types, a new control flow engine for PHP, full GitHub pull requests workflow support right inside the IDE, a brand-new Inspection widget, OpenAPI support via a plugin, and more.
