title: What does this PHP syntax mean? Can't find any information in the docs
body: <pre><code>function get( $str ){
      $matches = $this-&gt;xml-&gt;xpath("/conf/item [@name= \"$str\"]");
      if (count($matches)) {
      $this-&gt;lastmatch = $matches[0];
      return (string) $matches[0];
  }
  </code></pre>
  
  <p>I can't find any information about what the last line of this code does. </p>
  
  <p>What does this <strong>(string) $matches[0]</strong> piece do? </p>
  
  <p>As I can guess, it returns the zero element of the array as a string. But I didn't find any mention about this syntax in the docs.</p>
  
  <p>Am I right?</p>
  
  <p>And it will be great if you provide me with a link where I can read about this.</p>