File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / strings / nl2br.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 8 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--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 />
"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>