Okay, guys.
So something important that I really would like to stress.
We're going to be running PHP programs through command line terminal.
However you call it on Mac OS, that's just a terminal app.
You might also use a third party terminal applications.
And on the windows this is command prompt or preferably PowerShell.
It's identical on all the systems, even on Linux.
What's important is that you have PHP available through command line.
You need to run PHP hyphen v, and this should give you a PHP version.
And we're going to run the PHP code this way.
Even if we already have a web project, we would be using a built in PHP server to start the server,
so it's available in the web browser.
But before we do that, we're going to be using PHP through command line to run PHP code like this one.
So the way it works is you type PHP and you follow that by the location of the PHP file you'd like to
run.
If I run this one, this is a roll a dice example, which you can roll until you hit jackpot or until
you just tell it to stop.
That's a one way to run it through your terminal application, whatever is the name of this terminal
app.
Another way which I often do is within the built in Visual Studio Code terminal.
There is absolutely no difference which way you use.
So in here in the view menu you've got this terminal option.
This will open a terminal.
In your case it might be at the bottom.
I just have VSCode configured for this project.
So it is on the right.
And in here you do it exactly the same way.
It's important that you need to be in the directory of the project where you have all those files,
and then you can run the programs the same way.
There is absolutely no difference.
Now, finally, it might be just useful to learn the shortcut for opening the terminal inside VSCode
on my system.
This is just control.
Tilde.
I think it is similar on windows, but you can check it out by just opening it from the view menu.
You're gonna see it right here.
So as a summary, doesn't matter if you use the built in terminal in VSCode, as I will be doing most
of the time, or a separate app like PowerShell, Command Prompt terminal or warp, whatever terminal
app you prefer.
It's just the way we're gonna be running PHP programs.