3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tmp = array('id' => 'blah'); if (1==1) { $sql = "some sql statement $tmp[id]"; echo $sql; } //^ that is not working $sql prints as empty but if I do : if (1==1) { $anything = $tmp['id']; $sql = "some sql statement $tmp[id]"; echo $sql; }
based on sKZEI
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
some sql statement blahsome sql statement blah