--TEST-- Test nl2br() function : usage variations - html values for 'str' argument --FILE-- Hello
world", "
", "\nHello\r\nworld\r", "\n \r\n \r", ); //loop through $strings array to test nl2br() function with each element foreach( $strings as $str ){ var_dump(nl2br($str) ); } echo "Done"; ?> --EXPECT-- *** Testing nl2br() : usage variations *** string(29) "Hello
world" string(19) "
" string(45) "
Hello
world
" string(37) "


" Done