3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $files1 = array('AAA', 'BBB', 'CcC'); function bbq( &$path ) { $path = strtolower($path); return true; } $files2 = array_filter($files1, 'bbq'); var_dump($files1, $files2);
based on RLlsR
Output for 7.0.0 - 7.2.0
array(3) { [0]=> string(3) "AAA" [1]=> string(3) "BBB" [2]=> string(3) "CcC" } array(3) { [0]=> string(3) "AAA" [1]=> string(3) "BBB" [2]=> string(3) "CcC" }
Output for 4.3.0 - 5.6.28
array(3) { [0]=> string(3) "aaa" [1]=> string(3) "bbb" [2]=> string(3) "ccc" } array(3) { [0]=> string(3) "aaa" [1]=> string(3) "bbb" [2]=> string(3) "ccc" }