Bheka okuguqukayo ku-PHP / JS ukuze kube khona

Lapho usebenza ngokuguquguqukayo ku-PHP nakuJavaScript nsuku zonke, umuntu uvame ukuhlangana nombuzo wokuthi ukuguquguquka akunalutho. Kuyafaneleka ukwazi imisebenzi yendabuko nokwehluka kwayo ngezinhloso zokuhlola. Ngokudabukisayo, ayikho indlela elula yokuhlola ngokunembile ukuthi ngabe okuguqukayo kukhona noma cha. I-matrix engezansi ikhombisa ukuthi kusho ukuthini lokhu. Noma kunjalo, okufunayo kungenziwa kabusha kusetshenziswa imisebenzi emincane yomsizi.


I-PHP

  === null == null is_null isset empty if/else ternary count > 0 == '' === '' @__x
$a true true true false true false false false true false false
null true true true false true false false false true false false
[] false true false true true false false false false false false
0 false true false true true false false true true false true
1 false false false true false true true true false false true
-1 false false false true false true true true false false true
'' false true false true true false false true true true false
' ' false false false true false true true true false false false
str false false false true false true true true false false true
[0,1] false false false true false true true true false false true
[0] false false false true false true true true false false true
new stdClass() false false false true false true true true false false false

Ukuqaliswa kwe- __x:

740550c6b3d2b9ae03e4d220eb08e6e3

Umsebenzi wokusiza __x ubizwa nge- opharetha yokulawula iphutha @, okuvame ukunganconywa, ukuze ukwazi nokubheka okuguquguqukayo okwakungachazwanga ngaphambili.

IJavaScript

  === null == null typeof input === 'undefined' if/else ternary length > 0 == '' === '' __x
$a false true true false false type error false false false
null true true false false false type error false false false
[] false false false true true false true false false
0 false false false false false false true false true
1 false false false true true false false false true
-1 false false false true true false false false true
'' false false false false false false true true false
' ' false false false true true true false false false
str false false false true true true false false true
[0,1] false false false true true true false false true
[0] false false false true true true false false true
new Object() false false false true true false false false false

Ukuqaliswa kwe- __x:

740550c6b3d2b9ae03e4d220eb08e6e3

Emuva