3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hex2bin($hexdata) { $bindata = ''; for ($i = 0; $i < strlen($hexdata); $i += 2) { $bindata .= chr(hexdec(substr($hexdata, $i, 2))); } return $bindata; } $td = mcrypt_module_open('rijndael-128', '', 'cbc', ''); mcrypt_generic_init($td, hex2bin("a6bf4df0f3edeb67763adbb23942c793"), hex2bin("0a2a7127c3918f5e")); $encrypted = mcrypt_generic($td, "application/epub+zip"); mcrypt_generic_deinit($td); mcrypt_module_close($td); echo bin2hex($encrypted); ?>
Output for 5.4.0 - 5.4.30
Fatal error: Cannot redeclare hex2bin() in /in/nUivD on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Fatal error: Call to undefined function mcrypt_module_open() in /in/nUivD on line 13
Process exited with code 255.

preferences:
287.72 ms | 1395 KiB | 68 Q