PHP Syntax: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with "right|frame|PHP Programming Language<ref>http://www.flaticon.com/</ref> When PHP parses a file, it looks for opening and closing tags, which are <?php and ?>...") |
Mr. MacKenty (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
[[file:php.png|right|frame|PHP Programming Language<ref>http://www.flaticon.com/</ref>]] | [[file:php.png|right|frame|PHP Programming Language<ref>http://www.flaticon.com/</ref>]] | ||
When PHP parses a file, it looks for opening and closing tags, which are <?php and ?> which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser. | == Syntax == | ||
When PHP parses a file, it looks for opening and closing tags, which are <?php and ?> which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser.<ref>http://php.net/manual/en/language.basic-syntax.phptags.php</ref> | |||
== Instruction separation == | == Instruction separation == |
Latest revision as of 10:27, 7 September 2017
![](/images/6/61/Php.png)
PHP Programming Language[1]
Syntax[edit]
When PHP parses a file, it looks for opening and closing tags, which are <?php and ?> which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser.[2]
Instruction separation[edit]
As in C or Perl, PHP requires instructions to be terminated with a semicolon at the end of each statement. The closing tag of a block of PHP code automatically implies a semicolon; you do not need to have a semicolon terminating the last line of a PHP block. The closing tag for the block will include the immediately trailing newline if one is present.[3]
Overview of Topics[edit]
Topics | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|