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 = "This is my secret key"; $encrypted_string1 ="'Eg3sU9wCCcqEs2a22g1aCQcEU8ea5QmmOEakamskkQQ177a3Cec13k1QKEOa95EQ"; $secret_key1 = "SinigangNaManokMayHalongBaboy"; // Create the initialization vector for added security. $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_CBC), MCRYPT_RAND); $iv1 = "SinigangNaManok"; // Encrypt $string $encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_192, $secret_key1, $string, MCRYPT_MODE_CBC, $iv); // Decrypt $string $decrypted_string = mcrypt_decrypt(MCRYPT_RIJNDAEL_192, $secret_key1, $encrypted_string1, MCRYPT_MODE_CBC, $iv1); echo "Original string : " . $string . "<br />\n"; echo "Encrypted string : " . $encrypted_string . "<br />\n"; echo "Decrypted string1 : " . $decrypted_string . ""; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/VtkAY:23 Stack trace: #0 {main} thrown in /in/VtkAY on line 23
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:
61.8 ms | 401 KiB | 8 Q