using PhpefRuntimeCore;

public static int main(string[] args) {
    PhpefRuntimeNativeStandard.phpfunc_echo(Zval.from_string(""));
    PhpefRuntimeNativeStandard.phpfunc_echo_typed_void_arg1_string("");

    double typed_true = PhpefRuntimeNativeStandard.phpfunc_microtime_typed_double_arg1_bool_true();
    if (typed_true <= 0.0) {
        return 1;
    }

    var as_float = PhpefRuntimeNativeStandard.phpfunc_microtime(Zval.from_bool(true));
    if (as_float.kind != ValueKind.FLOAT || as_float.as_float() <= 0.0) {
        return 2;
    }

    if (as_float.as_float() < typed_true - 5.0 || as_float.as_float() > typed_true + 5.0) {
        return 3;
    }

    string typed_default = PhpefRuntimeNativeStandard.phpfunc_microtime_typed_string();
    if (!typed_default.contains(" ")) {
        return 4;
    }

    string typed_false = PhpefRuntimeNativeStandard.phpfunc_microtime_typed_string_arg1_bool_false();
    if (!typed_false.contains(" ")) {
        return 5;
    }

    var as_string = PhpefRuntimeNativeStandard.phpfunc_microtime();
    if (as_string.kind != ValueKind.STRING || !as_string.to_php_string().contains(" ")) {
        return 6;
    }

    var false_string = PhpefRuntimeNativeStandard.phpfunc_microtime(Zval.from_bool(false));
    if (false_string.kind != ValueKind.STRING || !false_string.to_php_string().contains(" ")) {
        return 7;
    }

    return 0;
}
