openssl_pkey_export

Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Gets an exportable representation of a key into a string
<?php openssl_pkey_export(    OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key,    string &$output,    ?string $passphrase = null,    ?array $options = null): bool