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 7.0.20, 7.1.5 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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.
Output for 7.0.6 - 7.0.14, 7.1.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/hLO2l:14 Stack trace: #0 /in/hLO2l(5): fnEncrypt('Klartext', 'aaaaaaaaaaaaaaa...') #1 {main} thrown in /in/hLO2l on line 14
Process exited with code 255.
Output for 7.0.0 - 7.0.5
Warning: mcrypt_encrypt(): Key of size 50 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 50 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 100 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 100 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 150 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 150 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 200 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 200 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 250 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 250 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 300 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 300 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 350 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 350 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 400 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 400 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 450 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 25 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 450 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 44 Decrypred: </br>
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.5.35 - 5.5.38, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_encrypt() in /in/hLO2l on line 16
Process exited with code 255.
Output for 5.6.0 - 5.6.20
Warning: mcrypt_encrypt(): Key of size 50 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 50 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 100 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 100 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 150 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 150 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 200 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 200 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 250 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 250 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 300 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 300 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 350 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 350 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 400 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 400 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br> Warning: mcrypt_encrypt(): Key of size 450 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 26 Encrypred: </br> Warning: mcrypt_decrypt(): Key of size 450 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/hLO2l on line 46 Decrypred: </br>
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.34
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br> Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 26 Encrypred: sG5YJbvi01RLxKw/1D4/5zJqw81+9A3syEjarPCeIcY=</br> Warning: mcrypt_decrypt(): Size of key is too large for this algorithm in /in/hLO2l on line 46 Decrypred: Klartext</br>
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/hLO2l on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/hLO2l on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/hLO2l on line 16

preferences:
285.36 ms | 401 KiB | 398 Q