News for hackers. Stuff that matters.
Re:Taking PHP Seriously [pdf] by camus on Saturday September 28, 2013 @06:16AM (#6461465)
PHP(.net) doesnt have strict typing ,but type hinting, which is not the same.
Re:Taking PHP Seriously [pdf] by Navarr on Saturday September 28, 2013 @04:05PM (#6462981)
It does have strict typing with objects, but not literals.

If I make a function meow(MyClass $meow) { } it will throw errors if anything other than a MyClass is given to it, including NULL.

Re:Taking PHP Seriously [pdf] by camus on Monday September 30, 2013 @06:13AM (#6468680)
You are wrong , it has type hinting , not strict type checking. You can alias types, there is no hard types in PHP except for arrays. Your function signature check the name of the object in the namespace , not it's type.
Re:Taking PHP Seriously [pdf] by jtreminio on Monday September 30, 2013 @09:29AM (#6469466)
function meow(MyClass $meow) { }

This will only accept an object that is_a MyClass. It can either implement an interface MyClass, extend an abstract MyClass, extend a regular class MyClass, or be the actual object MyClass.

Namespaces have nothing to do with this, other than you being able to use the "use" statement at the top to alias it.