diff --git a/ext/standard/tests/strings/nl2br_error.phpt b/ext/standard/tests/strings/nl2br_error.phpt
new file mode 100644
index 0000000000000..c600dddda6b43
--- /dev/null
+++ b/ext/standard/tests/strings/nl2br_error.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Test nl2br() function : error conditions
+--FILE--
+
+--EXPECTF--
+*** Testing nl2br() : error conditions ***
+
+-- Testing nl2br() function with Zero arguments --
+Warning: Wrong parameter count for nl2br() in %s on line %d
+NULL
+
+-- Testing nl2br() function with more than expected no. of arguments --
+Warning: Wrong parameter count for nl2br() in %s on line %d
+NULL
+Done
diff --git a/ext/standard/tests/strings/nl2br_variation1.phpt b/ext/standard/tests/strings/nl2br_variation1.phpt
new file mode 100644
index 0000000000000..89480cbca5d98
--- /dev/null
+++ b/ext/standard/tests/strings/nl2br_variation1.phpt
@@ -0,0 +1,84 @@
+--TEST--
+Test nl2br() function : usage variations - double quoted strings for 'str' argument
+--FILE--
+
+--EXPECTF--
+*** Testing nl2br() : usage variations ***
+-- Iteration 1 --
+string(17) "Hello
+World"
+-- Iteration 2 --
+string(31) "
+Hello
+World
+"
+-- Iteration 3 --
+string(17) "Hello
+World"
+-- Iteration 4 --
+string(31) "
+Hello
+World
+"
+-- Iteration 5 --
+string(18) "Hello
+World"
+-- Iteration 6 --
+string(34) "
+Hello
+World
+"
+-- Iteration 7 --
+string(7) "
+"
+-- Iteration 8 --
+string(14) "
+
+"
+-- Iteration 9 --
+string(17) "Hello
+World"
+Done
diff --git a/ext/standard/tests/strings/nl2br_variation2.phpt b/ext/standard/tests/strings/nl2br_variation2.phpt
new file mode 100644
index 0000000000000..a4423df319d5c
--- /dev/null
+++ b/ext/standard/tests/strings/nl2br_variation2.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Test nl2br() function : usage variations - single quoted strings for 'str' argument
+--FILE--
+
+--EXPECTF--
+*** Testing nl2br() : usage variations ***
+-- Iteration 1 --
+string(2) "\n"
+-- Iteration 2 --
+string(2) "\r"
+-- Iteration 3 --
+string(4) "\r\n"
+-- Iteration 4 --
+string(12) "Hello\nWorld"
+-- Iteration 5 --
+string(12) "Hello\rWorld"
+-- Iteration 6 --
+string(14) "Hello\r\nWorld"
+-- Iteration 7 --
+string(7) "
+"
+-- Iteration 8 --
+string(14) "
+
+"
+-- Iteration 9 --
+string(17) "Hello
+World"
+Done
diff --git a/ext/standard/tests/strings/nl2br_variation3.phpt b/ext/standard/tests/strings/nl2br_variation3.phpt
new file mode 100644
index 0000000000000..c7baced9100cf
--- /dev/null
+++ b/ext/standard/tests/strings/nl2br_variation3.phpt
@@ -0,0 +1,75 @@
+--TEST--
+Test nl2br() function : usage variations - heredoc strings for 'str' argument
+--FILE--
+
+--EXPECTF--
+*** Testing nl2br() : usage variations ***
+string(147) "
+
+
+
+
+
+
+
+nn
+
+
+n
+
+rr
+
+
+r
+
+
+
+
+
+
+r
+n"
+string(118) "Hello
+World
+This is es for
+
+ew lines
+like
+
+
+
+
+ and etc"
+Done
diff --git a/ext/standard/tests/strings/nl2br_variation4.phpt b/ext/standard/tests/strings/nl2br_variation4.phpt
new file mode 100644
index 0000000000000..eceb0670216b3
--- /dev/null
+++ b/ext/standard/tests/strings/nl2br_variation4.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Test nl2br() function : usage variations - html values for 'str' argument
+--FILE--
+Hello
world