3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $color = array('white', 'green', 'red', 'blue', 'black'); $string = "The memory of that scene for me is like a frame of film forever frozen at that moment: the {$color[2]} carpet, the {$color[q]} lawn, the {$color[0]} house, the leaden sky. The new president and his first lady. - Richard M. Nixon"; echo $string;
Output for 7.2.0 - 7.3.0rc6
Warning: Use of undefined constant q - assumed 'q' (this will throw an Error in a future version of PHP) in /in/pMq96 on line 4 Notice: Undefined index: q in /in/pMq96 on line 4 The memory of that scene for me is like a frame of film forever frozen at that moment: the red carpet, the lawn, the white house, the leaden sky. The new president and his first lady. - Richard M. Nixon
Output for 5.3.0 - 7.1.20
Notice: Use of undefined constant q - assumed 'q' in /in/pMq96 on line 4 Notice: Undefined index: q in /in/pMq96 on line 4 The memory of that scene for me is like a frame of film forever frozen at that moment: the red carpet, the lawn, the white house, the leaden sky. The new president and his first lady. - Richard M. Nixon
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant q - assumed 'q' in /in/pMq96 on line 4 Notice: Undefined index: q in /in/pMq96 on line 4 The memory of that scene for me is like a frame of film forever frozen at that moment: the red carpet, the lawn, the white house, the leaden sky. The new president and his first lady. - Richard M. Nixon