title: Run test in phpunit with specific php version
body: <p>I have installed multiple PHP versions on my Mac and want to run unit-tests against a specific PHP version (or against multipls versions)</p>
  
  <p>Here's the php versions I have:</p>
  
  <pre><code>$ php --version
    Output: PHP 5.4.23 ...
  
  $ /Applications/MAMP/bin/php/php5.2.17/bin/php --version
    Output: PHP 5.2.17 ...
  </code></pre>
  
  <p>My test case looks like this:</p>
  
  <pre><code>function test_php_version() {
      $actual = phpversion();
      $expected = '5.2.17';
      $this-&gt;assertEquals( $expected, $actual, 'Wrong PHP version!' );
  }
  </code></pre>
  
  <p>When I run the test I get this response:</p>
  
  <pre><code>$ phpunit
  
    Wrong PHP version!
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'5.2.17'
    +'5.4.24'
  
  $ /Applications/MAMP/bin/php/php5.2.17/bin/php phpunit
    Error: Could not open input file: phpunit
  </code></pre>
  
  <p>How can I run the tests with the php version 5.2.17?</p>
  
  <hr>
  
  <p><strong>Update</strong>:</p>
  
  <p>I discover that PHPUnit does not run with php5.2.17 anymore. So I change my requirements to run unit tests with php5.3.5, which is supported.</p>