3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $check; if (!isset($_POST['checkid'])) { $check = 'checked="checked"'; } ?> <html> <body> <div> <form method="POST"> <input type="checkbox" id="checkid" value="1" onChange="this.form.submit();" {$check} /> </form> </div> <body> </html>
based on nu2iH
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
<html> <body> <div> <form method="POST"> <input type="checkbox" id="checkid" value="1" onChange="this.form.submit();" {$check} /> </form> </div> <body> </html>
Output for hhvm-3.15.4
Notice: Undefined variable: check in /in/rMXgV on line 2 <html> <body> <div> <form method="POST"> <input type="checkbox" id="checkid" value="1" onChange="this.form.submit();" {$check} /> </form> </div> <body> </html>