3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('HEX2BIN_WS', " \t\n\r"); function hex2bin($hex_string) { $pos = 0; $result = ''; while ($pos < strlen($hex_string)) { if (strpos(HEX2BIN_WS, $hex_string{$pos}) !== FALSE) { $pos++; } else { $code = hexdec(substr($hex_string, $pos, 2)); $pos = $pos + 2; $result .= chr($code); } } return $result; } $encodedSecret = "3d3d516343746d4d6d6c315669563362"; echo hex2bin(strrev(base64_decode($encodedSecret))); ?>
Output for 5.4.0 - 5.4.13
Fatal error: Cannot redeclare hex2bin() in /in/6dHBW on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.29