title: Node.js path.join() in php
body: <p>I had some good experience with <code>node.js</code>, and I found <code>path.join()</code> very useful function, since it will take care that there is no extra slashes in the <code>URL</code>.</p>
  
  <p>I was wondering if something can be done in php to join relative part of an url and not end up with extra slashes in the url?</p>