openssl_pkey_export()
The openssl_pkey_export() function exports a private key to a string or file. This is useful for storing and sharing private keys.