title: DateTime comparison not working PHP
body: <p>timing comparison not working out if passed dynamically</p>
  
  <pre><code>$date = new DateTime();
      $date-&gt;setTimezone(new DateTimeZone('America/New_York'));                                  
      $myTime =$date-&gt;format('H:i');
      $myDay =$date-&gt;format('l');
  if(($s&lt;=$myTime) &amp;&amp; ($e&gt;=$myTime||$e=="00:00")) 
    {$open =1;}
  </code></pre>
  
  <p>Following works if hard coded</p>
  
  <pre><code>if(("11:30"&lt;="05:39")&amp;&amp;("23:00"&gt;="05:39"||"23:00"=="00:00"))
        {$open =1;}
  </code></pre>
  
  <p>where m i going wrong</p>