You can navigate to your project folder by using the change directory or cd command followed by the directory. For me it is: cd /Users/josephtylerjones/Developer/scripts/
Now you can check the syntax of your script by running php -l followed by the file name. For me it is:
This command will detect any syntax errors in your script!
php -l testfile.php