public static function escapeAssertion($s)
    {
        if (0 === strpos($s, 'r.')) {
            $s = substr_replace($s, 'r_', 0, 2);
        }
        if (0 === strpos($s, 'p.')) {
            $s = substr_replace($s, 'p_', 0, 2);
        }

        $s = preg_replace_callback("~(\|| |=|\)|\(|&|<|>|,|\+|-|!|\*|\/)(r|p)(\.)~", function ($m) {
            return $m[1].$m[2].'_';
        }, $s);

        return $s;
    }
public static function escapeAssertion($s)
    {
        if (0 === strpos($s, 'r.')) {
            $s = substr_replace($s, 'r_', 0, 2);
        }
        if (0 === strpos($s, 'p.')) {
            $s = substr_replace($s, 'p_', 0, 2);
        }

        $s = preg_replace_callback("~(\|| |=|\)|\(|&|<|>|,|\+|-|!|\*|\/)(r|p)(\.)~", function ($m) {
            return $m[1].$m[2].'_';
        }, $s);

        return $s;
    }
public static function escapeAssertion ( $ s ) { if ( 0 === strpos ( $ s , 'r.' ) ) { $ s = substr_replace ( $ s , 'r_' , 0 , 2 ) ; } if ( 0 === strpos ( $ s , 'p.' ) ) { $ s = substr_replace ( $ s , 'p_' , 0 , 2 ) ; } $ s = preg_replace_callback ( "~(\|| |=|\)|\(|&|<|>|,|\+|-|!|\*|\/)(r|p)(\.)~" , function ( $ m ) { return $ m [ 1 ] . $ m [ 2 ] . '_' ; } , $ s ) ; return $ s ; }
escapes the dots in the assertion, because the expression evaluation doesn't support such variable names.

@param string $s

@return string
escapes the dots in the assertion because the expression evaluation doesn t support such variable names .