openssl_csr_get_public_key
Function • Params and return types changed in PHP 8.0
Returns the public key of a CSR.
openssl_csr_get_public_key Function synopsis
openssl_csr_get_public_key(OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true): OpenSSLAsymmetricKey|false
Parameters
$csr
TypeOpenSSLCertificateSigningRequest|string
$short_names
OptionalTypeboolDefault valuetrue
This parameter is ignored
Return value
TypeOpenSSLAsymmetricKey|false
Returns an OpenSSLAsymmetricKey on success, or false on error.
Changes to the openssl_csr_get_public_key Function
PHP 8.0
- Return type added:
OpenSSLAsymmetricKey|false - Parameter type added for parameter #1 (
$csr):OpenSSLCertificateSigningRequest|string - Parameter name of parameter #2 changed:
$use_shortnamesto$short_names - Parameter type added for parameter #2 (
$short_names):bool - Parameter default value added for position #2 (
$short_names):true
- openssl_csr_get_public_key($csr, $use_shortnames)
+ openssl_csr_get_public_key(OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true): OpenSSLAsymmetricKey|false PHP 7.1
- Optional parameter added - #2:
$use_shortnames
- openssl_csr_get_public_key($csr)
+ openssl_csr_get_public_key($csr, $use_shortnames) openssl_csr_get_public_key Function Availability
openssl_csr_get_public_key Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |