Lines Matching refs:a
7 function plus($a, $b) { argument
8 return $a + $b;
11 function gen_plus($a) { argument
12 return mt_rand(0, 9 - $a);
15 function minus($a, $b) { argument
16 return $a - $b;
19 function gen_minus($a) { argument
20 return mt_rand(0, $a);
23 function print_infix($name, $a, $b) { argument
24 return "$a $name $b";
27 function print_prefix($name, $a, $b) { argument
28 return "$name($a, $b)";
43 $a = mt_rand(0, 9);
44 $an = NUMS[$a];
45 $b = isset($c[2]) ? $c[2]($a) : mt_rand(0, 9);
60 $a = array_search($an, NUMS, false);
63 if (empty($c) || $a === false || $b === false) return false;
65 return (NUMS[$c[0]($a, $b)] === $answer);