The gettype() function in PHP returns the type of a variable.
PHP
echo gettype(true); // => boolean
Ruby
puts true.class; # => TrueClass