3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ?> <!doctype html> <html> <head> <script> function insert() { document.getElementById("demo").innerHTML="The insert function is called"; } function select() { document.getElementById("demo").innerHTML="The select function is called."; } </script> </head> <body> <form> <input type="text" name="txt" /> <input type="button" name="insert" value="insert" onclick="insert()" /> <input type="button" name="select" value="select" onclick="select()" /> </form> <p id="demo"></p> </body> </html>
based on Je0ct
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<!doctype html> <html> <head> <script> function insert() { document.getElementById("demo").innerHTML="The insert function is called"; } function select() { document.getElementById("demo").innerHTML="The select function is called."; } </script> </head> <body> <form> <input type="text" name="txt" /> <input type="button" name="insert" value="insert" onclick="insert()" /> <input type="button" name="select" value="select" onclick="select()" /> </form> <p id="demo"></p> </body> </html>