A PHP script <?php starts with ?> and can end with it. In pure PHP files, you can actually leave out the closing tag. Every statement needs to end with a semicolon ;. Forgetting the semicolon is usually the first fight beginners have with PHP.
php
<?php
// Single-line comment
echo "<h1>This heading comes from PHP</h1>";
/*
Multi-line comment
Useful when explaining bigger blocks
*/
echo "<p>This paragraph also comes from PHP.</p>";
?>You should see
The browser shows a heading and a paragraph.