3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['tval'] = "hey what's up"; if(isset($_POST['tval'])) { $text = explode(PHP_EOL, htmlspecialchars($_POST['tval'])); foreach($text as $line) { echo "<script>alert('". $line ."');</script>"; } }

preferences:
31.64 ms | 405 KiB | 5 Q