1
I wonder if there’s a way "disable" the case sensitive in a certain comparison.
Example:
var_dump('SQL'=='SQL'); # bool(true)
var_dump('SQL'=='sQL'); # bool(false)
I know there are ways to solve one of them with strtoupper()
or strtolower()
, but I would like to know specifically if you can deactivate directly in a comparison.
It also has the function
strcasecmp
:var_dump(strcasecmp('SQL', 'sQL'))
, but I don’t know if this is what I expected to see– Isac
Resolve! It’s comparative between 2 strings so it fits perfectly!
– rbz