3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Clear = "Klartext"; for ($i=50; $i < 500; $i += 50) { $crypted = fnEncrypt($Clear, str_repeat('a', $i)); echo "Encrypred: ".$crypted."</br>"; $newClear = fnDecrypt($crypted, str_repeat('a', $i)); echo "Decrypred: ".$newClear."</br>"; } function fnEncrypt($sValue, $sSecretKey) { return rtrim( base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, $sSecretKey, $sValue, MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size( MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB ), MCRYPT_RAND) ) ), "\0" ); } function fnDecrypt($sValue, $sSecretKey) { return rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, $sSecretKey, base64_decode($sValue), MCRYPT_MODE_ECB, mcrypt_create_iv( mcrypt_get_iv_size( MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB ), MCRYPT_RAND ) ), "\0" ); }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/hLO2l:16 Stack trace: #0 /in/hLO2l(5): fnEncrypt('Klartext', 'aaaaaaaaaaaaaaa...') #1 {main} thrown in /in/hLO2l 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:
52.41 ms | 401 KiB | 8 Q