--TEST-- openssl_x509_read() tests --SKIPIF-- --FILE-- getMessage() . "\n"; } try { openssl_x509_read($f); // read an array with the filename } catch (TypeError $exception) { echo $exception->getMessage() . "\n"; } ?> --EXPECTF-- object(OpenSSLCertificate)#%d (0) { } object(OpenSSLCertificate)#%d (0) { } Warning: openssl_x509_read(): X.509 Certificate cannot be retrieved in %s on line %d bool(false) object(OpenSSLCertificate)#%d (0) { } openssl_x509_read(): Argument #1 ($certificate) must be of type OpenSSLCertificate|string, array given openssl_x509_read(): Argument #1 ($certificate) must be of type OpenSSLCertificate|string, array given