Get the type of variable

type:detect($variable) : STRING

type:detect(TRUE)     
#=> "BOOL"

type:detect(2)              
#=> "INT"

type:detect(2.0)            
#=> "FLOAT"

type:detect('hi')           
#=> "STRING"

type:detect([1,2])          
#=> "ARRAY"

type:detect(-1)             
#=> "INT"

type:detect(-1.0)           
#=> "FLOAT"

type:detect(0)              
#=> "INT"

type:detect(0.0)            
#=> "FLOAT"

type:detect(NULL)           
#=> "NULL"

type:detect(ƒ(){})   
#=> "FUNCTION"

Copyright ©2013-2022 SunSed®. All rights reserved.