How to Use and Execute PHP Codes in Linux Command Line – Part 1

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

4 Responses

  1. akmal says:

    Just type it in command line.
    php -r 'echo "hello world!";'

  2. Charles says:

    when after creating the file info.php and I execute it I get the code back instead of its execution:

  3. Dan says:

    I liked the article, am about to read the 2nd in the series.

    this line
    < >
    is a little confusing, perhaps it should be
    Next thing, we do is to test to see if php is installed correctly or not. We can do this by creating a file

    Thanks for the hard work publishing these,

  4. Mikhail P. -BLR- says:

    I have long been used as the php scripting language for command line. I would like the development of this article. thanks.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.