title: PHP: set variable to infinity
body: <p>I am wondering if I can set a variable to infinity, and if not what the best way to achieve my problem is. Take my function below:</p>
  
  <pre><code>public function seekValue($value, $column = null, $limit = null) {
    $this-&gt;connect('rb');
    $results = array();
    while (!feof($this-&gt;_pointer)) {
        $data = explode($this-&gt;_config-&gt;delimiter(), fgets($this-&gt;_pointer, 1024));
        if(!is_null($column)) {
            if ($data[$this-&gt;_config-&gt;columns($column, "string")-&gt;index()] == $value)
                array_push($results, $this-&gt;formatRow($data));
        } else {
            if (in_array($value, $data))
                array_push($results, $this-&gt;formatRow($data));
        }
    }
    $this-&gt;disconnect();
    switch (count($results)) {
        case 0;
            return false;
        case 1;
            return $results[0];
        default;
            return $results;
    }
  }
  </code></pre>
  
  <p>I set <code>$limit = null</code> in the function parameter list, however I later want to use <code>$limit</code> in my while loop like so <code>while (!feof($this-&gt;_pointer) &amp;&amp; count($results) &lt; $limit)</code> incase the user decides to pass an integer to it.</p>
  
  <p>If this was the case I could do this: </p>
  
  <pre><code>if (!is_int($limit)) {
    $limit = infinity;
  }
  </code></pre>
  
  <p>To say that if <code>$limit</code> is not set run infinite times.</p>
  
  <p>I hope this makes sense.</p>