namespace Php {
    /**
     * PHP string concatenation: `$left . $right`.
     */
    public Php.zval concat (Php.zval left, Php.zval right) {
        return Php.zval.string_value (zval_to_string (left) + zval_to_string (right));
    }

    /**
     * PHP string concatenation for generated multi-part expressions without
     * deeply nested concat() calls.
     */
    public Php.zval concat_many (params Php.zval[] values) {
        var builder = new StringBuilder ();
        foreach (Php.zval value in values) {
            builder.append (zval_to_string (value));
        }
        return Php.zval.string_value (builder.str);
    }

    public void concat_assign (Php.zval left, Php.zval right) {
        left.assign_string (zval_to_string (left) + zval_to_string (right));
    }
}
