php callback function in class
问题 for some reasons, our hosting company used PHP 5.2 and doesn't even have mysqli and PDO pre-installed. I have no choice but to rewrite some part of my code to make it 5.2 compatible. so, here is my question: In PHP 5.2 Anonymous function is not supported, so i did the following test to make sure I'm changing the code correctly: class foo{ public function toString(){ $arr = array("a", "b"); $arr2 = array("c", "d"); print_r(array_map('mapKeyValue', $arr, $arr2)); } private function mapKeyValue(