title: php detect and convert dates from a string
body: <p>I was wondering if I could somehow to detect a <code>date</code> in a string and convert it into a <code>standard date format</code>.</p>
  
  <p>Let's consider the input strings below:</p>
  
  <p><code>Company registered on 16 March 2003</code> </p>
  
  <p>or </p>
  
  <p><code>Activity between 10 May 2006 an 10 July 2008 - no changes.</code></p>
  
  <p>Now I would like a PHP function to apply over the strings and get the dates as <code>YYYY-mm-dd</code></p>
  
  <p>Example:</p>
  
  <p><code>$date = DateExtract($sting1); // output: 2003-03-16</code></p>
  
  <p><code>$date = DateExtract($sting2); // output: ['2006-05-10','2008-07-10']</code></p>