3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = 'RainBow'; $encrypted = 'iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQAQMAAAC6caSPAAAABlBMVEX///8AAABVwtN+AAAEVElEQVR4nO2bTXKdQAyERbFgyRE4CkeDo3EUjsCSBYUy3dIM2G8Tu2omWWic50psvmy69NcaROLUP53yXCK96jmc6Ufjgc+0y5R+saUfzLrKsi72ZCBtkBvq9FevV39SqYG/OSQxeHybE5UeX5cV/w6kFZLEvPvLlRz49HiMSiV3ASBgEgIhA2mLuJQpxgZEmOJxKokI21KESSD/AmHq09MDzM4+PalPAmmMeOpDkBlxpAhLck4QM2U+TckPae8zWwbyt4hJcAEaTn4RGfcJX9vMr1T1P1uFQCoi5SQtB5QYPZHEIGUKl31mwLDuy8cJpB5CKe8eYnrdJ8I0ligqiWYMH2EaC6QFQm1uVBdj0CcfXvcn1c0K/0o15YmvQCojqe5nQCnkcKJLppQWYllLxJhly0DqIy8lUZJStyDWKcjH/EItA/kF0mnqepHH1IoLxhGGS5Jl5zCSx/dX6gukAQLm8lHEh8RRMb0nKa3qz2qJTCSQVggCrMPw7n0y6wuCDMCOwd1bssSIn0DqI+jH7u7i3wd2ZKeZw7SGre47sWpRP5DaiGnJwdICjDVJGGHpz8bkx8SI1KdPjAVSFUn1CJy3ych+bBVGepAl+Qn75NyMBVIfMTHpjiHOWJJQkQ6f96mlefbL0ycH8iOEunQYRRgvaJU9jVndn00ZuF0EAmmDWKOs1pExjVndz/GySU5jUtQPpAFitj1XVsPLtbf5ZfIsRtOeTwfSBkGIlVsRNvCPhw+W9rilPh7J4gdSG7HJMu8RxaWkaW+PaR73pXRwgTRB7u61effnuOQCtlmz8L4REchPEY4i95euF/HiGyv1ArO+dQmkBfLksWxCljzmfbKW8/TJgVRGGGE0Vcy0Z30ZGWKa3a7N7p1IqUmBVEc6V/Ky1TulVIsxP1BzzakvkFaIGmBS+vwCNXc8PjHzbfPKqyriUgZSHxFmPzfttUjJirS7lOVmVzG7AvkRgjuK7zyWzS5bWOGgI+PVOUyJGkgz5LZExnhBo3zk1buZKnP6tqhdCfI+OZAWiPqtxt72Iu7Aaxaz3DpZXiEWSG3EPEi7Pif0h3mpcaTZJcW0z0pqIG2QIiXNrrx4NyF9skSbvLg5LIE0QWz1Dqvr8gWvL7kmmJAT4otBZn3ya1sfSANELPUN2bTXclJ8iUm56GPEBPJDBJtEvvjJS/AY3mn1sk+eTBP1CvNciAikOqJ2wSExJ1e8thnhdaBsQ86Wx1QCaYX4XsSvz8FWGXKE7cKhUs1UsSOBtEHy4UXg/AL7943V/MW0D6QBkre7Pe8Pqd+fU3/3jY49fBir+9nnD6Q+4u+K2odSErElF6KMu0dcIBL+54H8BunK2+haTEi/3oCQoavieUwCaY5cXx14SCm2eH9t3il0IG0RVXttxM1h+W7a53IUSBPEUl9/Paa92MaKATZzwYvB0re8gbRBmNOY965n3Ld3eXZbJGpZpqhqIG2QOP/l+QPs8HUSjWdh7wAAAABJRU5ErkJggg=='; $encrypted = 'ypsEp4Hi0cbf8b9Dcjq/Mbjf41Pge2Fffcf53coEt5gm0IcbNB3UgU74a65QSo4tYoqImg4jGM46YPIUbqmPxw=='; $data = base64_decode($encrypted); $iv = substr($data, 0, mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); $decrypted = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_128, hash('sha256', $key, true), substr($data, mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)), MCRYPT_MODE_CBC, $iv ), "\0" ); echo 'Encrypted:' . "\n"; var_dump($encrypted); echo "\n"; echo 'Decrypted:' . "\n"; var_dump($decrypted);
based on NNOAH
Output for 7.0.6 - 7.3.0alpha1
Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/ftJqo:9 Stack trace: #0 {main} thrown in /in/ftJqo on line 9
Process exited with code 255.
Output for 5.6.0 - 5.6.20, 7.0.0 - 7.0.5
Encrypted: string(88) "ypsEp4Hi0cbf8b9Dcjq/Mbjf41Pge2Fffcf53coEt5gm0IcbNB3UgU74a65QSo4tYoqImg4jGM46YPIUbqmPxw==" Decrypted: string(34) "No akkor ezeket meg kellene oldani"
Output for 5.6.21 - 5.6.25
Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/ftJqo on line 9
Process exited with code 255.