Are you PHP senior?View other answers to this thread
3.4K+ developers have started their personal blogs on Hashnode in the last one month.
Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more
var_dump((int) "test" == "test"); because 0 has to be equal to "test" ;D ... obviously :)
j Well, I give that like example. Is better to use strict rules inside function arguments but imagine that we expect in that function integer, boolean, float and string. Integer is for ID, float is for price, boolean is for email send and string is for some message. We can use same funcion and simple if/else to separate data and use same function for various things. Is stupid example but I figureout it before some times where I was forced to use same string for various data like I decribe above. In that my problem I was not able to add additional argument or aditional string, just must expect something from database and do with that how I know and separate it properly.
I first time use this in my 14 years of practice.