blob: 6a3b94023c24a5e185106fac5fe91e30e33b2838 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--TEST--
nl2br() function
--FILE--
<?php
var_dump(nl2br("test"));
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(4) "test"
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 />
"
|