What is the path to the PHP interpreter in the CS50 appliance? I used it a couple times but I forgot what the path is. I think it starts with #/env or something similar.

Thanks, David

2 Answers 2


If I understand correctly you mean the path to php interpreter so that to use a #! to make it executable. It's #!/usr/bin/env php.

  • Yes that's it! Thanks!
    – i_am_david
    Commented Aug 7, 2015 at 15:05
  • You know what to do. ;)
    – ChrisG
    Commented Aug 7, 2015 at 15:06
  • Yep! :) Done! Thanks
    – i_am_david
    Commented Aug 7, 2015 at 15:10

I think the simplest answer is php <filename>.

So if you have a php file called hello.php that looks like this:

printf("Hello, world!\n");

you would run php hello.php and you'd get Hello, world! as the output on the screen.

Is that what you mean?

  • It's not what I meant, but it works. Chris had what I wanted, sorry I'll have to accept his answer. Either way I'll upvote yours.
    – i_am_david
    Commented Aug 7, 2015 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .