DEV Community

Discussion on: How to write a different PHP?

jinoantony profile image
Jino Antony

It would be helpful if you can add the PHP version from which each feature is available. I think most features you mentioned only available in PHP 7.4

dwilmer profile image
Daan Wilmer

New in 7.4 are the arrow functions and the $foo ??= 'bar; assignment. 7.2 brought class-based type hinting and return types, and everything else was included in 7.0 - including $too = $foo ?? 'bar'; and scalar type hinting.