3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = ''; $pw = '7._&~+rTVrGhL3Qis-FO2hNli<=3%(]f'; // Set a random salt $salt = openssl_random_pseudo_bytes(8); $salted = ''; $dx = ''; // Salt the key(32) and iv(16) = 48 while (strlen($salted) < 48) { $dx = md5($dx.$password.$salt, true); $salted .= $dx; } $key = substr($salted, 0, 32); $iv = substr($salted, 32, 16); if (! strlen($data)) { $encrypted_data = openssl_encrypt($data, 'aes-256-cbc', $key, true, $iv); var_dump( 'Salted__' . $salt . $encrypted_data); die('***'); } //$encrypted_data = openssl_encrypt($data, 'aes-256-cbc', $key, true, $iv); //print base64_encode('Salted__' . $salt . $encrypted_data);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/eNriR:6 Stack trace: #0 {main} thrown in /in/eNriR on line 6
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:
47.75 ms | 401 KiB | 8 Q