openssl_csr_export

Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Exports a CSR as a string
<?php openssl_csr_export(OpenSSLCertificateSigningRequest|string $csr, string &$output, bool $no_text = true): bool