Hello, World!
This page was generated at: 2026-02-04 02:59:24
Your timezone: UTC
Dynamic Content
Welcome to PHP!
Good morning! Today is Wednesday.
How This Works
Look at the source code of this file (templating.php):
- HTML outside
<?php ?>tags passes through unchanged - PHP inside the tags is executed on the server
- The
<?= $var ?>shorthand echoes the value - The browser only sees the final HTML - no PHP code!
View Page Source
Right-click and "View Page Source" in your browser. You'll see:
- No PHP code - it was all executed server-side
- Just the resulting HTML with values filled in
- The date/time values are "baked in" to the HTML
Key Insight
PHP runs per-request. Each time you refresh this page:
- Server receives new HTTP request
- PHP interpreter starts fresh
- Script executes from the beginning
- Output is sent as HTTP response
- PHP process ends - all variables are lost
There's no persistent state between requests (that's why we need sessions!).