PHP Statement and PHP Script

titanif

New member
Hello all, I am preparing for PHP developer Interview and I read [a blog post] about PHP Statement and PHP Script, and I am very confused about these two terms, in my opinion both are same, can any one please help me to understand about these two terms (PHP Stament and PHP Script)?


Thank you
 
No, PHP statements and scripts are not the same but are related terms.
A statement is a single line of code, while a PHP script is an overall code containing multiple statements that work together.

Statement: A statement is an action or condition.
Eg. $x = 5, echo "Hello";

Script: The script is a complete program, It includes a bunch of actions or conditions and puts them to generate the desired output.
 
Back
Top