PHP Archives

How to run PHP from the command line in Linux

Did you know that you can run PHP directly from the command line? Here’s how: Running a command Let’s run a one-liner and see the output displayed in our console. We’ll use phpinfo() because we know it should generate a lot of text. We need to start our line with php, use the -r switch … Read more