Get php-version @ github.com/wilmoore/php-version then:
Initial Run (my default version of PHP is 5.4.0)
./script.php
Result
Active PHP version: 5.4.0
Switch to version 5.3.10
php-version 5.3.10 >/dev/null && ./script.php
Result
Active PHP version: 5.3.10