3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = ""; foreach(range(0,10) as $k => $v){ echo ${arr.$k} = $v."\n"; }
based on tZlkv
Output for 7.2.0
Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 0 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 1 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 2 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 3 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 4 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 5 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 6 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 7 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 8 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 9 Warning: Use of undefined constant arr - assumed 'arr' (this will throw an Error in a future version of PHP) in /in/QKXHu on line 4 10
Output for 5.3.22 - 7.1.10
Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 0 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 1 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 2 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 3 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 4 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 5 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 6 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 7 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 8 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 9 Notice: Use of undefined constant arr - assumed 'arr' in /in/QKXHu on line 4 10