PHP strips newlines by default
-
-
test-
-
-
test
-
-
-
test-
-
-
test
-
-
-
test
-
-
-
test
-
-
-
test
test
-
Source
- <pre><span>-
<?php echo '<span class="test">test</span>'; ?>
-</span></pre>
- <pre><span>-
<?php echo '<span class="test">test</span>'; ?>
-</span></pre>
- <pre><span>-
<?php echo '<span class="test">' . 'test' . '</span>'; ?>
-</span></pre>
- <pre><span>-
<?php echo '<span class="test">test</span>' . "\n"; ?>
-</span></pre>
- <pre><span>-
<?php echo '<span class="test">test</span>' . "\r\n"; ?>
-</span></pre>
- <pre><span>-
<?php echo '<span class="test">test</span>
'; ?>
-</span></pre>
- <pre><span>-
<?php for ($i = 0; $i < 2; $i++) { ?>
<span class="test">test</span>
<?php } ?>
-</span></pre>