4 ms·
BOTH behaviors don't make sense. The right behavior is to throw an exception.
by Too 14y ago
BOTH behaviors don't make sense. The right behavior is to throw an exception.
- enjo 14y agoAbsolutely agree, and that's PHP's biggest issue. It is constantly doing things like this instead of simply complaining and stopping things down like any sane system would. If I were in charge of PHP, release 6 would be 5.4.4 with the standard library happily throwing exceptions on invalid input. That's it. The language would be 100% more useful instantly.
- eitland 14y agoThis depends on language. Or you'd have to dismiss at least on widely used systems programming language as well. : )
- Too 14y agoWell...if we are allowed to change language completely we could change to a type safe language (as most systems programming are) and we wouldn't have this discussion in the first place since it would be impossible to call the function with a string parameter...