title: Get max value of property in an array of objects / entities
body: <p>I have a list of entities:</p>
  
  <pre><code>array = (0 =&gt; entity1, 1=&gt; entity2,..., n=&gt;entityn);
  </code></pre>
  
  <p>Every entity has a property called:</p>
  
  <pre><code>$initializedLevel = new ArrayCollection(); 
  //key for this ArrayCollection is a 'date', value is an integer (= the level)
  </code></pre>
  
  <p>Every entity has a method called</p>
  
  <pre><code>getInitializedLevel($date)
  // returns the level (= integer) for a specific date.
  </code></pre>
  
  <p>How do I get the highest level for a given date?</p>