Type detection: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
console.log(typeof(12345)); // Returns number |
console.log(typeof(12345)); // Returns number |
||
</pre> |
</pre> |
||
== OASYS Assembler == |
|||
<lang oasys_oaa> |
|||
; The following method checks if a global variable or property is an |
|||
; object type. Does not work with locals and arguments. |
|||
[&OBJ#,^] |
|||
,^<,^<< ; Remember old value |
|||
,^<*> ; Create new object |
|||
,^<<DES ; Destroy the object |
|||
,^<<EX ; Check if variable has been cleared |
|||
/>1RF ; It is clear |
|||
:>0RF ; It is not clear |
|||
</lang> |
|||
== PHP == |
== PHP == |
||
[ |
[http://php.net/manual/en/function.gettype.php] |
||
<pre> |
<pre> |
||
Line 21: | Line 36: | ||
=== Specific tester functions === |
=== Specific tester functions === |
||
* [ |
* [http://php.net/manual/en/function.is-array.php is_array()] |