Type detection: Difference between revisions

Content added Content deleted
(Add a task description)
(→‎PHP: Added zkl)
Line 43: Line 43:


* [http://php.net/manual/en/function.is-array.php is_array()]
* [http://php.net/manual/en/function.is-array.php is_array()]

=={{header|zkl}}==
<lang zkl>fcn processText(data_or_fileName){ // unknown
if (data_or_fileName.isType(String)) // == .isType("")
data_or_fileName=File(data_or_fileName,"rb").read(); //-->Data
text:=text.text; //-->String
doTheActualTextProcessing(text);
}</lang>
If an int is passed in, (123).text --> "123", other objects might throw an exception.