Getting started with PHP ..

I am new to PHP. I have developed my own web site with a lot of javascript in simple HTML files. I want to do some extensions with PHP but I can't make a simple web page function. I am sure something simple is wrong. Help!

Here is the test web page I made: hello.html

<html>
 <head>
  <title>Hello World</title>
 </head>
 <body>
  <?php echo 'Hello World!'; ?>
 </body>
</html>

Pointing Safari at hello.html gives me a new tab with the correct title, but no "Hello World" in the page itself.

Here is the output of php --version:

WARNING: PHP is not recommended PHP is included in macOS for compatibility with legacy software. Future versions of macOS will not include PHP. PHP 7.3.24-(to be removed in future macOS) (cli) (built: Jun 17 2021 21:41:13) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies

As you can see in the WARNING, PHP is not considered to be a supported feature of recent macOS, so it is not appropriate to discuss about it here. You can find many sites on the web which are explaining PHP on macOS.

I use XAMPP to create a PHP/Apache/MySQL server since Apple stopped bundling it with the system. I really wish there was easier bridging so I can switch over to using Swift instead of PHP...

Getting started with PHP ..
 
 
Q