3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function encode($text) { return bin2hex($text); } function decode($base16){ return pack("H*", $base16); } function encrypt($key, $link){ $cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); @mcrypt_generic_init($cp, $key, $key); $enc = mcrypt_generic($cp, $link); mcrypt_generic_deinit($cp); mcrypt_module_close($cp); return $enc; } echo encrypt("KEY", "LINK"); echo "\r\n"; echo encrypt("KEY", encrypt("KEY", "LINK")); $key="31323334353637383930393837363534"; $link="62QTUQPXD5PTTmyJPr6wh/b7fdQR94C+MEwg1XEvXI2nV4Lg38yp6AKLW6/ZWW5Z8c+CjfCWZkJoBkpl/p2SS7rp4GAuUR07OKu9rDp/2yoX14y/zx13w62yt6DIRvqWpk/Z4B1EFgSaky6UIHHefubrpnJtAmdq4hhtZXbrNvZvxn6DG74ZJC4B2Qwp3PM1EYz7PiK1MQv2p6dcLdi5J1seJUp9oICdKKYF/hDnNXC6UQSOKz1QDD8oWd4glsp1WGOiR7XXat4llB3g+rZV2suupoR6jpFDAv5DK3GUjEZGUUAgnhNMbHvRVFfce80LOQn7Lh+TUvrXqfE45fzgJcf6qswWHdFCtF8mOUQvjsr67wkkBTn4shNG1bWYF5oXbBOArt+R9dk5IluD2mDGiOj3FymwPQFd+nrHFYIsnSMHs3VC7jpa8nVHo2zYajeXc43dgMiH4mZwfYica1myoKqAfnCpokhaSaOtbE0SKOdhJw2Hw90IChEwvlWFoZmeW1MlA3W9CYIGdR4Xwxl7TXNgw2w9EXwXc0N8WQV1bK7AUB3F722HJMgiLCqjs9UzSTk6yhBs4LNdKnW+F44iQEV7vFibvGVbwanjypxX+E4aydaPPFA3TCpZY+pEo2IY3mfmnH8oyswlp55SvIvLBU4IHNNdfv8ONZzUiasaQSZxQ0K6aVm8nbjUBZEfCX3h5N1h047Vt0sVSI19Bsv9mDzIgXc1jnDREvDdhQM97lzzctm+fyjAPnXmScuqPnhn"; //echo base64_encode(encrypt(encode($key), $link));
based on 1QgsT
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Call to undefined function mcrypt_module_open() in /in/QRTiv:13 Stack trace: #0 /in/QRTiv(21): encrypt('KEY', 'LINK') #1 {main} thrown in /in/QRTiv on line 13
Process exited with code 255.
Output for hhvm-3.15.4
�FtZ�B���F���O� WbEi�pf`Jb�@�Y
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function mcrypt_module_open() in /in/QRTiv on line 13
Process exited with code 255.