3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_url_safe_characters = array ( '-', '_', '', ); $_not_url_safe_characters = array ( '+', '/', '=', ); /* Data */ $key = 'this is a very long key, even too long for the cipher'; $encrypted_price = '-cMgOXQks'; $key = '123456789012345678901234'; $str_iv = 'genieeee'; $encrypted_price = str_replace ( $_url_safe_characters, $_not_url_safe_characters, $encrypted_price ); echo 'encrypted_price = '. $encrypted_price, ','; $encrypted_price = base64_decode ( $encrypted_price ); echo 'decodebase64 = '. $encrypted_price, ','; /* Open module, and create IV */ $td = mcrypt_module_open('des', '', 'cfb', ''); /* Initialize encryption handle */ if (mcrypt_generic_init($td, $key, $str_iv) != -1) { /* Encrypt data */ $decrypted_price = mdecrypt_generic($td, $encrypted_price); /* Clean up */ mcrypt_generic_deinit($td); mcrypt_module_close($td); } echo 'decrypted_price = '. floatval($decrypted_price); ?>
based on Xsd48
Output for 7.0.6 - 7.3.1
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Fatal error: Uncaught Error: Call to undefined function mcrypt_module_open() in /in/pcbjr:26 Stack trace: #0 {main} thrown in /in/pcbjr on line 26
Process exited with code 255.
Output for 5.4.0 - 5.5.34, 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Warning: mcrypt_generic_init(): Key size too large; supplied length: 24, max: 8 in /in/pcbjr on line 29 decrypted_price = 0
Output for 5.0.0 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Fatal error: Call to undefined function mcrypt_module_open() in /in/pcbjr on line 26
Process exited with code 255.
Output for 4.4.5 - 4.4.9
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Fatal error: Call to undefined function: mcrypt_module_open() in /in/pcbjr on line 26
Process exited with code 255.
Output for 4.3.2 - 4.4.4
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Fatal error: Call to undefined function: mcrypt_module_open() in /in/pcbjr on line 26
Process exited with code 255.
Output for 4.3.0 - 4.3.1
encrypted_price = +cMgOXQks,decodebase64 = �� 9t$, Fatal error: Call to undefined function: mcrypt_module_open() in /in/pcbjr on line 26