2 ms·
> Even JavaScript is miles better (PHP has a type system equally as bad, if not worse). That's just not true. Just one example: PHP will throw runtime errors w
by stabbles 8y ago
> Even JavaScript is miles better (PHP has a type system equally as bad, if not worse).
That's just not true. Just one example: PHP will throw runtime errors when (1) an argument type being passed to a function does not match its corresponding declared parameter type and (2) a value being returned from a function does not match the declared function return type. In pure Javascript you can't restrict the types of objects being passed to or returned from a function.