As companies started adopting TypeScript/Flow into their Javascript pipeline, PHP developers realised the need for something similar in their ecosystem.
I work at Vimeo (which has a lot of business logic in PHP) and I took it upon myself to write a static analysis tool (which you can play with at https://psalm.dev). Other similar static analysis tools were developed at other places that use PHP, and together they have helped make modern-day PHP development a little more orderly.