Major version 6 implements type declarations for input parameters, function returns, variables etc. It supports PHP 7.4 and PHP 8. When you upgrade to major version 6, if you extend classes etc., then you will need to make similar type declarations in your code.
- #42: The
coroutinefunction now supports
returnin the passed generator
function. This allows you to more generally return a value. This is a BC
break as this is a feature that was only made possible with PHP 7, and
before the coroutine function would only ever return the last thing that
was yielded. If you depended on that feature, replace your last