Xa usebenza nezinto eziguquguqukayo kwi-PHP nakwiJavaScript mihla le, umntu uhlala efumana umbuzo wokuba ngaba umahluko awunanto. Kuyimfuneko ukwazi imisebenzi yemveli kunye nolwahluko wokujonga iinjongo. Ngomsindo, akukho ndlela ilula yokujonga ukuba ngaba umahluko ukhona okanye awukho. Imatriki engezantsi ibonisa ukuba kuthetha ntoni oku. Nangona kunjalo, into oyifunayo inokuphinda ichazwe ngemisebenzi encinci yomncedisi.
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 |
Ukuphunyezwa kwe __x:
740550c6b3d2b9ae03e4d220eb08e6e3
Umsebenzi wokunceda __x ubizwa ngokuba ngumqhubi wolawulo lwempazamo @, nto leyo ihlala ingacetyiswa, ukuze ube nakho ukukhangela izinto ezazingachazwanga 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 |
Ukuphunyezwa kwe __x:
740550c6b3d2b9ae03e4d220eb08e6e3