whether there is the same as javascript php isset and empty?

whether there is the same as javascript php isset and empty?

is set () is used to detect whether a php variable wood tub , the function returns a boolean true / false. In javascript, you can replace it! (Typeof (a) = "undefined") or write function. Example: var a = 12; if ( typeof (a) = " undefined") alert ( "A Defined!" (); (!)
PHP use empty () checks if the variable is empty in the javascript you. can be used directly if (variable) to determine, as in javascript, variables automatically to the type you want to example:.; ( "! a is defined"). var a if (a) alert; } but here and there are some problems, for example, if a = null set or a = undefined, it will inevitably converted to a Boolean value or false.
no untyped isnan and typeof

Guess you like

Origin www.cnblogs.com/blogst/p/10950146.html