Strings & Patterns Learning Mode

The following script defines a function called buildUrl(), which is intended to be a crude way of normalizing URLs.

What line of code must be inserted into buildUrl() to ensure $url1 and code $url2 are both equal to http://phpriot.com/quiz/?

<?php
    function buildUrl($domain, $path) {
        // insert line of code here
        return $ret;
    }

    $domain1 = 'http://phpriot.com/';
    $domain2 = 'http://phpriot.com';
    $path    = '/quiz/';

    $url1 = buildUrl($domain1, $path);
    $url2 = buildUrl($domain2, $path);
?>