3v4l.org

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