If you're new to PHP and want to get a basic page up and running, follow these simple steps:
Make sure PHP is installed on your computer. You can download it from php.net/downloads or install it using your system's package manager (like Homebrew on macOS or apt on Ubuntu).
Make a folder called myproject and in that folder make a new file named index.php
and add the following:
<h1>hello</h1>
Open your terminal, go to the folder where index.php
is saved, and run:
php -S localhost:8000
Then open your browser and go to:
<http://localhost:8000>
You should see the word “hello” on the page.
If you are using Windows, you can try WSL. It should work.