3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $result = ''; echo "\0"; echo "a"; for ($t=0; $t<128; $t++) $result .= "\\".chr($t); echo "strlen = ".strlen($result)."\n"; echo "Result = ".$result."\n";
Output for 4.3.0 - 5.3.28, 5.4.0 - 5.4.27, 5.4.34 - 7.2.0
astrlen = 256 Result = \\\\\\\\\\ \ \ \ \ \\\\\\\\\\\\\\\\\\\ \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\0\1\2\3\4\5\6\7\8\9\:\;\<\=\>\?\@\A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z\[\\\]\^\_\`\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z\{\|\}\~\
Output for 5.3.29, 5.4.28 - 5.4.32
astrlen = 256 Result = \\\\\\\\ \ \ \ \ \\\\\\\\\\\\\\\\\\\ \!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\0\1\2\3\4\5\6\7\8\9\:\;\<\=\>\?\@\A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z\[\\\]\^\_\`\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z\{\|\}\~\