3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'test'; $resource = openssl_pkey_new(['private_key_bits' => 512]); $public_key = openssl_pkey_get_details($resource)['key']; openssl_pkey_export($resource, $private_key); openssl_public_encrypt($message, $enc_message, $public_key); $enc_message = base64_encode($enc_message); openssl_private_decrypt($enc_message, $dec_message, $private_key); $dec_message = base64_decode($dec_message); echo '<pre>'; var_dump([ 'public_key' => $public_key, 'private_key' => $private_key, 'message' => $message, 'enc_message' => $enc_message, 'dec_message' => $dec_message ]); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function openssl_pkey_new() in /in/jRri9:4 Stack trace: #0 {main} thrown in /in/jRri9 on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
53.33 ms | 401 KiB | 8 Q