DEV Community

Discussion on: How PHP Type Declarations Actually Work

Collapse
 
alexhaxe profile image
Alexander Blum

Have you looked into using Haxe as a possible way to have strict typing while still being able to target PHP?
Granted type checking only happens during compile time and generated PHP code might be harder to read, but Haxe adds a lot more than just type checking.

So if you've never heard of Haxe, it might be worth checking it out.

Disclaimer: Despite my user name, I'm not connected to the makers of Haxe, but I'm using Haxe for my past, current and future PHP projects.

Collapse
 
robdwaller profile image
Rob Waller

Thanks for the suggestion I'll give it a look.