3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $yourname = 'Trav'; $a = array_fill(0,10, $yourname); array_walk($a, function ($a2, $key) {echo $a2[key]; });
Output for 7.2.1
Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T Warning: Use of undefined constant key - assumed 'key' (this will throw an Error in a future version of PHP) in /in/26l9o on line 5 Warning: Illegal string offset 'key' in /in/26l9o on line 5 T