3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(hex2bin('48617570747374726173736520315c6e416e737072656368706172746e65723a204d6178204d75737465726d616e6e')); var_dump(hex2bin('5c6e')); // var_dump(bin2hex(" ")); $string = hex2bin('48617570747374726173736520315c6e416e737072656368706172746e65723a204d6178204d75737465726d616e6e'); echo $string; echo PHP_EOL, '----', PHP_EOL; echo str_replace('\n', "<br/>\n", $string);
based on R02F2
Output for 5.4.0 - 7.2.0
string(47) "Hauptstrasse 1\nAnsprechpartner: Max Mustermann" string(2) "\n" string(2) "0a" Hauptstrasse 1\nAnsprechpartner: Max Mustermann ---- Hauptstrasse 1<br/> Ansprechpartner: Max Mustermann
Output for 5.0.0 - 5.3.29
Fatal error: Call to undefined function hex2bin() in /in/qHVAi on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hex2bin() in /in/qHVAi on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hex2bin() in /in/qHVAi on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hex2bin() in /in/qHVAi on line 2