Implementation
Haskell

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "reflect"
fmt.Println(reflect.TypeOf(x))
print ref($x)||"SCALAR", "\n";
print(type(x))
import std.stdio: writeln;
writeln(typeid(x));
int a = 0;
String b = "str";
System.out.println(((Object)a).getClass().getName());
System.out.println(b.getClass().getName());
System.Console.WriteLine(x.GetType());
echo is_object($x) ? get_class($x) : gettype($x);
puts x.class
print(type(x))
print(x.__class__)
#![feature(core_intrinsics)]
fn type_of<T>(_: &T) -> &'static str {
    unsafe { std::intrinsics::type_name::<T>() }
}

println!("{}", type_of(&x));
fmt.Printf("%T", x)
print(x.runtimeType);
console.log (typeof x);
console.log (x == null ? x + '' : x.constructor.name);
#include <typeinfo>
std::cout<<typeid(x).name();
print(type(x))