3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * PHP mcrypt - Basic encryption and decryption of a string */ $string = "Some text to be encrypted"; $secret_key = "15874873782"; $encrypted_string = "Jg7GpP1uxf+qTBEzBQTu5Q=="; // Create the initialization vector for added security. // $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND); // Encrypt $string //$encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $secret_key, $string, MCRYPT_MODE_CBC, $iv); // Decrypt $string $decrypted_string = mdecrypt_generic($secret_key, $encrypted_string); echo "Original string : " . $string . "<br />\n"; //echo "Encrypted string : " . $encrypted_string . "<br />\n"; echo "Decrypted string : " . $decrypted_string . "<br />\n"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mdecrypt_generic() in /in/h0J0O:16 Stack trace: #0 {main} thrown in /in/h0J0O on line 16
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:
32.43 ms | 401 KiB | 8 Q