function addChClass(&$table, $chars, $class) { foreach ($chars as $ch) { $ord = Qevix::ord($ch); $table[$ord] = (isset($table[$ord]) ? $table[$ord] : 0) | $class; } }
function addChClass(&$table, $chars, $class, $add = false) { foreach ($chars as $ch) { $ord = Qevix::ord($ch); if (!$add or !isset($table[$ord])) { $table[$ord] = $class; } else { $table[$ord] = (isset($table[$ord]) ? $table[$ord] : 0) | $class; } } }