title: worst case in terms of performance with PHP if else statement
body: <pre><code>function quadrant($x,$y) {
  
  if( $x &gt;= 0 &amp;&amp; $y &gt;= 0 )
      $result = "point ($x,$y) lies in the First quandrant";
  else if( $x &lt; 0 &amp;&amp; $y &gt;= 0)
      $result = "point ($x,$y) lies in the Second quandrant";
  else if( $x &lt; 0 &amp;&amp; $y &lt; 0)
      $result = "point ($x,$y) lies in the Third quandrant";
  else if( $x &gt;= 0 &amp;&amp; $y &lt; 0)
      $result = "point ($x,$y) lies in the Fourth quandrant";
  
  return $result;
  
  }
  
  $x=1;
  $y=1;
  $q = quadrant($x,$y);
  </code></pre>
  
  <p>what is the value of $x or $y that is the worst case in terms of performance? and how many comparisons are made?</p>
  
  <p>what is the value of $x or $y that is the best case in terms of performance? and how many comparisons are made?</p>