function smartyCompare($a, $b, $strict = false, $invert = false) { $result = $strict ? $a === $b : $a == $b; return $invert ? !$result : $result; }