19 $expression = ltrim($expression,
'=');
20 $expression = trim($expression);
21 preg_match_all(
"/([^\\\\&]|\\\\&)*/ui", $expression, $matches);
30 $return[] = str_ireplace(
'\&',
'&', $r);
33 return array_map(
'trim', $return);
46 $pattern =
'#((^\[\[)[\d\.]+)|(\(|\)|\\' . implode(
"|\\", $operators) .
')#';
47 $tokens = preg_split($pattern, $math_expression, - 1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
49 return array_map(
'trim', $tokens);