class Test {
    static function main() {
        trace("Length of a String: " + length("Hello world"));
        trace("Length of an Array: " + length([0, 3, 5, 2, 1]));
        trace("This will throw a runtime error: " + length(3));
    }
    
    static inline function length(o:Dynamic) {
        return o.length;
    }
}