PHP script starts with <?php and ends with ?>, between PHP code is used to add program logic.

<?php or <?PHP both are allowed.

PHP scripts can be placed anywhere in php file. PHP every statement ends with semicolon ;

Example

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>

PHP Case Sensitivity

PHP is a not fully case sensitive language, it means PHP only treats variable name as case sensitive, while function, class, construct are not case sensitive.