> PHP supports strict typing
Still missing types for object properties :(
Re:Modern PHP without a framework
by tylerjwilk00 on Sunday April 01, 2018 @10:33AM
(#16728474)
As a work around you can use a private member variable with type hinted setter and getter.
Now the reason to use PHP over Java or Go is that PHP at this point has a type system that’s on par with Go’s but at the same time it gives you an advantage of fast development process thanks to the lack of need for compilation and/or restarting the container after each change in the code. I’m currently working with Java and before that I had a long experience of PHP, while I personally would choose Java over PHP almost in any case because I value type system features perhaps a bit too much, but I do suffer from those slow turnaround times (compile/restart TomCat) and I can see how it could potentially be bad for the business at early stages especially.
So the bottom line is PHP at this point has a nice balance which is hard to find atm in any other popular languages with evolved ecosystem