3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php $str1 = "foo\x00bar\x00baz"; function showRawCharacters($result) { $resultInHex = unpack('H*', $result); $resultInHex = $resultInHex[1]; $resultSeparated = implode(', ', str_split($resultInHex, 2)); //byte safe echo $resultSeparated."\n"; } showRawCharacters($str1); echo "strcmp = ".strcmp($str1, "foo\x00bar\x00baz")."\n"; echo "strlen = ".strlen($str1)."\n";
Output for 5.3.0 - 5.4.27
Parse error: syntax error, unexpected '<' in /in/g93a6 on line 3
Process exited with code 255.