79753223

Date: 2025-09-02 07:55:02
Score: 0.5
Natty:
Report link

What you’re seeing means PHP isn’t being executed at all.
Browsers never run PHP. A web server must process your .php file and return plain HTML. If you “open” a .php file directly from disk (e.g., file:///C:/.../index.php) or use a static dev server (like VS Code’s Live Server), the raw PHP is sent to the browser and appears as if it’s “commented out.”

The “Quirks Mode” warning is a separate HTML issue (missing/incorrect doctype). It doesn’t make PHP run or not run.

Fix:

Run with PHP's built-in server:

cd project
php -S localhost:8000

then you can open your project at http://localhost:8000/index.php

Notes:

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): What you
  • Low reputation (1):
Posted by: Colin