3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "<p>This is some <b>data</b> It has some <i>new lines</i> in it &amp; it has some <u>HTML</u> in it</p> <div>Look, there's some more new lines</div>"; var_dump($data); echo "\n\n"; $stripped = html_entity_decode(strip_tags($data)); var_dump($stripped); echo "\n\n"; $json = json_encode($stripped); var_dump($json); echo "\n\n"; $decoded = json_decode($json); var_dump($decoded);

preferences:
42.78 ms | 402 KiB | 5 Q