3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $plaintext = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"; echo "128-bit: ", bin2hex(mcrypt_encrypt('cast-128', "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x67\x89\x34\x56\x78\x9A", $plaintext, 'ecb')), "\n", "80-bit: ", bin2hex(mcrypt_encrypt('cast-128', "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x00\x00\x00\x00\x00\x00", $plaintext, 'ecb')), "\n", "40-bit: ", bin2hex(mcrypt_encrypt('cast-128', str_pad("\x01\x23\x45\x67\x12", 16, "\0"), $plaintext, 'ecb')), "\n"; ?>
Output for 7.0.6 - 7.1.0
128-bit: Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/du6Bf:8 Stack trace: #0 {main} thrown in /in/du6Bf on line 8
Process exited with code 255.
Output for 5.4.36 - 5.5.34, 5.6.7 - 5.6.20, 7.0.0 - 7.0.5
128-bit: 238b4fe5847e44b2 80-bit: 753de29f5d167d03 40-bit: f00b0530833d7444
Output for 5.0.0 - 5.4.35, 5.5.35, 5.6.21 - 5.6.28
128-bit: Fatal error: Call to undefined function mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
128-bit: Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
128-bit: Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
128-bit: Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8