3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { public function run() { array_walk($list = ['asda', 'basdsa'], [$this, 'sqlFilter']); var_dump($list); } private function sqlFilter($key, &$value) { $value = ucfirst($value); } } (new test)->run();
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/0Z9Ca on line 5 array(2) { [0]=> string(4) "asda" [1]=> string(6) "basdsa" }
Output for 5.4.10 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/0Z9Ca on line 5 array(2) { [0]=> string(4) "asda" [1]=> string(6) "basdsa" }
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/0Z9Ca on line 5
Process exited with code 255.