3v4l.org

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