3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_POST['testcolumn'] = 'example'; $line = 'example'; echo "<option" . (($_POST['testcolumn'] == "{$line}")?'selected="selected"':'') . ">{$line}</option>"; echo PHP_EOL . "vs" . PHP_EOL; echo "<option" . (($_POST['testcolumn'] == "{$line}")?' selected="selected"':'') . ">{$line}</option>"; echo PHP_EOL . "vs" . PHP_EOL; echo "<option", ($_POST['testcolumn'] === $line)?' selected':'' , ">$line</option>";
based on TtUgF
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
<optionselected="selected">example</option> vs <option selected="selected">example</option> vs <option selected>example</option>