Hacker News new | past | comments | ask | show | jobs | submit login

In your example, 123e4 is a valid PHP number.

That said, input is a problem. In a dynamically typed language, it's easy for beginners to expect HTTP and requests in PHP work the same way. In reality, you will be coercing from string to wherever you are working with, which could also be an array of strings, or vice versa.

Input rules would be nice. For example, we always want id to always be an unsigned integer in this context and email will always be... and so on.

Dynamic typing makes, in this case, two types look like either plain old dynamic typing or leads to believing input has a homogeneous type.

In any case, I'm going to take a mag glass to some of our code today. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: