3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start_key=''; $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 $key;
Output for 4.3.0 - 7.1.0
-----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -----END PUBLIC KEY-----