3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $code = "-\r-\r\n-\n-"; var_dump(bin2hex($code)); $code = str_replace("\r\n", "\n", $code); var_dump(bin2hex($code)); $code = str_replace(array("\r\n", "\r"), "\n", $code); var_dump(bin2hex($code));
based on WEH6K
Output for 4.3.0 - 7.2.0
string(16) "2d0d2d0d0a2d0a2d" string(14) "2d0d2d0a2d0a2d" string(14) "2d0a2d0a2d0a2d"