3 ms·
This often comes up, but I never understood why. Is it a case of e.g. If "null" == null With implicit conversion? What language does this? I think perl
by riffraff 2y ago
This often comes up, but I never understood why.
Is it a case of e.g.
If "null" == null
With implicit conversion?
What language does this? I think perl might allow it by accident if you don't use strict/warnings pragmas, but it seems weird. Is it a PHPism perhaps?
- dehrmann 2y ago> What language does this? SQL injection, for one. For once, not PHP (thankfully).
- croes 2y agoBut an SQL injection is an exploit. In SQL ‘Null‘ != Null
- GauntletWizard 2y agoRight, but a ton of well-meaning but cure-is-worse-than-disease "Web Application Firewall" tools still block it
- Y-bar 2y agoPHP understands this properly: var_dump( "null" == null ); // bool(false)
- lusc 2y agoI have seen before that null is encoded as "null" when an encoding doesn't support null itself, e.g. multipart/form-data. Of course, then the server will treat any "null" as null