Function openssl_pkey_get_details can read this resource. Try:
<?php
print_r(openssl_pkey_get_details(openssl_csr_get_public_key($csr)));
?>
(PHP 5 >= 5.2.0, PHP 7)
openssl_csr_get_public_key — Returns the public key of a CERT
이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.
Function openssl_pkey_get_details can read this resource. Try:
<?php
print_r(openssl_pkey_get_details(openssl_csr_get_public_key($csr)));
?>