New implementation

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

println!("{}", type_of(&x));