3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html> <html> <head><title>some title</title></head> <body> <form method="post" action=""> <input type="text" name="something"/> <input type="submit" value="click" name="submit" /> </form> <?php if(isset($_POST['submit'])) { $text = $_POST ['something']; $replaced = preg_replace('#https://www\.youtube\.com/watch\?v=(\w+)[^\s]+#i','<iframe width="853" height="480" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>',$text); echo $replaced ; } ?> </body> <html>
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<!DOCTYPE html> <html> <head><title>some title</title></head> <body> <form method="post" action=""> <input type="text" name="something"/> <input type="submit" value="click" name="submit" /> </form> </body> <html>
Output for hhvm-3.10.0

Process exited with code 153.