title: How do I detect if a string is a path of any kind?
body: <p>This might be an easy answer. I'm using DOMdocument to traverse html documents and collect attribute names and values. I'm collecting both these values as generic terms, but I'd like to catch any values that are paths. Regardless of them being relative or absolute, and what the attribute name is e.g. src, href etc.</p>
  
  <p>Is there a way I can do an if test</p>
  
  <p>i.e.</p>
  
  <pre><code>if ($attrValue is path){
  do something
  }
  </code></pre>