DEV Community

Discussion on: Why PHP...???

Collapse
 
jnunez166 profile image
jnunez166

All HTTP 1.0/1.1 payload is string and integer values. Even binary files are BinHex'ed before transmitting.

If another language has booleans it's because it is converting the string for you. Will it do it for an online questionnaire? Answer a true/false question on a form and then save it to the database? Are you saving 0/1? Can't assume all answers will be boolean or ints? How about reports on the questionnaire? "98% answered 1". that will require the dev to flag the question as a boolean output then convert it back to a string.

Since you need to sanitize your data you should use the PHP filter_input library that was recommended by /mikcat.

Note: I am not lecturing or talking down to you but trying to provide you with the possible view of the PHP developers.