Home > Article > Backend Development > php script is surrounded by which delimiter
php scripts are surrounded by 070a725248c12040122fdab0529601f7 delimiters. Any content outside a pair of opening and closing tags will be ignored by the PHP parser, which allows PHP files to have mixed content.
You can embed PHP into an HTML document, as shown in the example below. (Recommended learning: PHP Programming from Beginner to Master)
<p>This is going to be ignored by PHP and displayed by the browser.</p> <?php echo 'While this is going to be parsed.'; ?> <p>This will also be ignored by PHP and displayed by the browser.</p>This will run as expected,
because when the PHP interpreter encounters the ?> end tag, it is simple Output the following content as it is (unless it is immediately followed by a newline - see command delimiter) until it encounters the next start mark; The exception is in the middle of a conditional statement, at which time the PHP interpreter will determine which Output, which ones to skip. See example below.
Use conditional structure:
Advanced separation using conditions<?php if ($expression == true): ?> This will show if the expression is true. <?php else: ?> Otherwise this will show. <?php endif; ?>In the above example, PHP will skip the paragraphs where the conditional statement is not reached, even if This paragraph is outside the PHP opening and closing tags. Since the PHP interpreter will directly skip the conditional statement block if the condition is not met, PHP will ignore it based on the condition. When you want to output a large piece of text, it is usually more efficient to jump out of PHP parsing mode than to output the text through echo or print.
You can use four different pairs of opening and closing tags in PHP.
Two of them, bb9bd6d87db7f8730c53cb084e6b4d2d and 842e8e9dd470ac0da5d8b75be3525bf2 2cacc6d41bbb37262a98f745aa00fbf0 are always available. The other two are short tags and ASP style tags, which can be turned on or off in the php.ini configuration file. Although some people find short tags and ASP-style tags convenient, they are less portable and generally not recommended.Note:
Also note that if you embed PHP into XML or XHTML you will need to use the bb9bd6d87db7f8730c53cb084e6b4d2d tag to maintain standards compliance.The above is the detailed content of php script is surrounded by which delimiter. For more information, please follow other related articles on the PHP Chinese website!