openssl_pkey_get_public

Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Extract public key from certificate and prepare it for use
<?php openssl_pkey_get_public(OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key): OpenSSLAsymmetricKey|false