3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $y[0] = 'Good'; $y[1] = ' morning!'; echo "${y[0]}$[y[1]}"; echo ${y[0]},${y[1]};
based on qeCpd
Output for 7.2.0
Good$[y[1]} Warning: Use of undefined constant y - assumed 'y' (this will throw an Error in a future version of PHP) in /in/CkmK1 on line 6 Notice: Array to string conversion in /in/CkmK1 on line 6 Array Warning: Use of undefined constant y - assumed 'y' (this will throw an Error in a future version of PHP) in /in/CkmK1 on line 6 Notice: Uninitialized string offset: 1 in /in/CkmK1 on line 6 Notice: Undefined variable: in /in/CkmK1 on line 6
Output for 5.6.8 - 7.1.10
Good$[y[1]} Notice: Use of undefined constant y - assumed 'y' in /in/CkmK1 on line 6 Notice: Array to string conversion in /in/CkmK1 on line 6 Array Notice: Use of undefined constant y - assumed 'y' in /in/CkmK1 on line 6 Notice: Uninitialized string offset: 1 in /in/CkmK1 on line 6 Notice: Undefined variable: in /in/CkmK1 on line 6
Output for 5.3.21 - 5.5.35
Parse error: syntax error, unexpected '[' in /in/CkmK1 on line 6
Process exited with code 255.