diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/tests/strings/nl2br.phpt | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/ext/standard/tests/strings/nl2br.phpt b/ext/standard/tests/strings/nl2br.phpt new file mode 100644 index 0000000000..7c1fa78835 --- /dev/null +++ b/ext/standard/tests/strings/nl2br.phpt @@ -0,0 +1,60 @@ +--TEST-- +nl2br() function +--POST-- +--GET-- +--FILE-- +<?php + var_dump(nl2br("")); + var_dump(nl2br(NULL)); + var_dump(nl2br("\r\n")); + var_dump(nl2br("\n")); + var_dump(nl2br("\r")); + var_dump(nl2br("\n\r")); + + var_dump(nl2br("\n\r\r\n\r\r\r\r")); + var_dump(nl2br("\n\r\n\n\r\n\r\r\n\r\n")); + var_dump(nl2br("\n\r\n\n\n\n\r\r\r\r\n\r")); + +?> +--EXPECT-- +string(0) "" +string(0) "" +string(8) "<br /> +" +string(7) "<br /> +" +string(7) "<br /> +" +string(8) "<br /> + +" +string(44) "<br /> + +<br /> +<br /> +<br /> +<br /> +<br /> +" +string(47) "<br /> + +<br /> +<br /> + +<br /> + +<br /> +<br /> +" +string(66) "<br /> + +<br /> +<br /> +<br /> +<br /> + +<br /> +<br /> +<br /> +<br /> +" |
