Skip to content
Justice Tech School

Syntax and Output

Statements end with a semicolon. echo prints one or more values and print prints one. Keywords are not case sensitive, but variable names are. Comments use //, # or /* ... */.

Example
echo "Hello", " ", "World\n";
print "Printed\n";
// a comment
# another comment
/* a multi-line
   comment */
echo 2 + 3, "\n";

Result

Hello World
Printed
5

Exercise

Which symbol ends a statement?

echo "Hi"

Quiz Test

Are PHP variable names case sensitive?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.