language: PHP (php 5.4.4)
date: 974 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
$string = "
put returns between paragraphs
 
for linebreak add 2 spaces at end
 
";
 
echo "Before\n-------------\n" . $string;
$string = preg_replace('~[\r\n]~', '', $string);
echo "After\n-------------\n" . $string;
 
?>
  • upload with new input
  • result: Success     time: 0s    memory: 13112 kB     returned value: 0

    Before
    -------------
    
    put returns between paragraphs
    
    for linebreak add 2 spaces at end
    
    After
    -------------
    put returns between paragraphsfor linebreak add 2 spaces at end