3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'col' => 'val', 'sub' => array( 'sub_col' => 'sub_val' )); $here = <<<HTML Col {$arr['col']} Sub = {$arr[sub][sub_col]} HTML; echo $here;
based on JTmKW
Output for 7.2.0
Warning: Use of undefined constant sub - assumed 'sub' (this will throw an Error in a future version of PHP) in /in/mEeEB on line 5 Warning: Use of undefined constant sub_col - assumed 'sub_col' (this will throw an Error in a future version of PHP) in /in/mEeEB on line 5 Col val Sub = sub_val
Output for 4.3.0 - 7.1.10
Notice: Use of undefined constant sub - assumed 'sub' in /in/mEeEB on line 5 Notice: Use of undefined constant sub_col - assumed 'sub_col' in /in/mEeEB on line 5 Col val Sub = sub_val