3v4l.org

run code in 200+ PHP versions simultaneously
<?php $start_key = <<< TEXT -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAp11fZi2kaPCCdOYQPHkHItqGcXaF0Uu9qfBBrcaDXo/Vaqy/niZt 34mO+l+7t/LQjsZl4P/Vjr4wQHZ2rd7PS1rL4XC08vn40szoCpfwyQcnirLkSzx0 wEu8a+bTCNP0i/XLoAaPsWKyZuF9oT6pmPtvvlHxqunaTrqNtFIQNWXrPksZEXh+ zx/2Z5dQ88QIWH6uRMbT+oq9IBE9VGBawzFPwpER2b4sX1ig+vgZhMhSGmHY0/qO VmW7m09T5UnnqSdG1nyICIJ17HBXaDToeqRrwiq7SamkBYpu4KP7ZGFo41/MHsnD NQ7kr7xwDQr+H8FmnSO1f9nB33WvboHJcwIDAQAB -----END RSA PUBLIC KEY----- TEXT; $start_key = str_replace('-----BEGIN RSA PUBLIC KEY-----', '', $start_key); $start_key = trim(str_replace('-----END RSA PUBLIC KEY-----', '', $start_key)); $key = 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A' . str_replace("\n", '', $start_key); $key = "-----BEGIN PUBLIC KEY-----\n" . wordwrap($key, 64, "\n", true) . "\n-----END PUBLIC KEY-----"; echo openssl_pkey_get_public($key);
Output for 7.1.20 - 7.2.6
Fatal error: Uncaught Error: Call to undefined function openssl_pkey_get_public() in /in/dcTSJ:16 Stack trace: #0 {main} thrown in /in/dcTSJ on line 16
Process exited with code 255.
Output for 5.4.15 - 7.1.7
Output for 5.0.0 - 5.1.1, 5.1.3 - 5.4.14
Fatal error: Call to undefined function openssl_pkey_get_public() in /in/dcTSJ on line 16
Process exited with code 255.
Output for 5.1.2
Fatal error: Call to undefined function openssl_pkey_get_public() in /in/dcTSJ on line 17
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_pkey_get_public() in /in/dcTSJ on line 16
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: openssl_pkey_get_public() in /in/dcTSJ on line 16
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: openssl_pkey_get_public() in /in/dcTSJ on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_pkey_get_public() in /in/dcTSJ on line 16