public static Memory random_bytes(Environment env, TraceInfo trace, int length) {
        if (length < 1) {
            env.exception(trace, BaseError.class, "Length must be greater than 0");
        }

        byte[] bytes = new byte[length];
        SECURE_RANDOM.nextBytes(bytes);

        return new BinaryMemory(bytes);
    }
https://www.php.net/manual/en/ref.csprng.php
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/crypto/csprng/CSPRNGFunctions.java