Users may not change the array itself from the callback function. e.g.
?php function pair( $var) {return ($var% 2 == 1);} function impair($var) {return ($var% 2 == 0);} $array1 = array("a"= 1, "b"= 2, "c"= 3, "d"= 4, "e"= 5); $array2 = array(6, 7, 8, 9, 10, 11, 12); $tableau_pair = array_filter($array1, "pair"); $tableau_impair = array_filter($array2, "impair");?