openssl_pkey_free

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

openssl_pkey_free释放一个私钥

说明

openssl_pkey_free ( resource $key ) : void

该函数释放由openssl_pkey_new()创建的私钥。

参数

key

持有该密钥的资源。

返回值

没有返回值。

User Contributed Notes

suconghou at gmail dot com 05-Jan-2021 08:31
PHP 8 deprecates openssl_free_key (actually openssl_pkey_free which it aliases) and automatically destroys the key instance when it goes out of scope.
djmaze 16-Jul-2019 08:51
This function also frees public key resources as received with openssl_pkey_get_public().

Manual above should say: "Frees a pkey resource"