SyntaxStudy
Sign Up
PHP Beginner 1 min read

What is PHP?

What is PHP?

PHP stands for PHP: Hypertext Preprocessor. It is a server-side scripting language embedded in HTML. PHP runs on the server and sends plain HTML to the browser.

What PHP Can Do

  • Generate dynamic page content
  • Read/write files on the server
  • Interact with databases (MySQL)
  • Handle forms and sessions
  • Power frameworks like Laravel

PHP File

PHP files use the .php extension. PHP code goes inside <?php ... ?> tags.

Example
<?php
echo "Hello, World!";
echo "<h1>Welcome to PHP!</h1>";

// Variables always start with $
$name = "Alice";
$age  = 25;
echo "Name: $name, Age: $age";
?>