3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = array('test'=>1, 'test2'=>2); if ($var) { ?> <span><?=$var['test']?></span> <?php } else { ?> <span><?=$var['test2']?></span> <?php }
Output for 5.4.0 - 7.1.0
<span>1</span>
Output for 4.3.0 - 5.3.29
<span><?=$var['test']?></span>