3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array(a => 'foo bar baz'); $data = array_map(function($value) { return str_replace('bar', 'xxx', $value); }, $data); print_r($data);
based on 74VX9
Output for 7.2.6 - 7.3.0beta1
Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/9lGIC on line 2 Array ( [a] => foo xxx baz )
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
Notice: Use of undefined constant a - assumed 'a' in /in/9lGIC on line 2 Array ( [a] => foo xxx baz )