2.3445, M_PI\n"; process(2.3445, M_PI, $farr); / / now make a bunch of string processing functions $garr = array (create_function('$b,$a' ,'if (strncmp($a,$b,3) == 0) return "** \"$a\ "'. 'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)" ;'), create_function('$a,$b' ,'; return "CRCs: ".crc32($a).", ".crc32(b) ;'), create_function('$a,$b' ,'; return "similar(a,b) = ".similar_text($a,$b, $p) ."($p%)" ;')); echo "\nUsing the second array of anonymous functions\n"; process("Twas brilling and the slithy toves", "Twas the night", $garr);
2.3445, M_PI\n"; process(2.3445, M_PI, $farr); / / Maintenant une liste de fonction sur chaîne de caractères $garr = array (create_function('$b,$a' ,'if (strncmp($a,$b,3) == 0) return "** \"$a\ "'. 'et \"$b\"\n** Ces chaînes de ressemblent!! (regarde les trois premiers caractères)" ;'), create_function('$a,$b' ,'; return "CRCs: ".crc32($a).", ".crc32(b) ;'), create_function('$a,$b' ,'; return "similarité(a,b) = ".similar_text($a,$b, $p) ."($p%)" ;')); echo "\nUtilisation de la secondes liste de fonctions anonymes\n"; process("Twas brilling and the slithy toves", "Twas the night", $garr);?