echo 1; ]."/> echo 1; ].">
search
HomeBackend DevelopmentPHP ProblemWhat are the ways to write php tags?

What are the ways to write php tags?

Sep 28, 2021 pm 04:47 PM
phpLabel

There are four ways to write the

php tag, namely: 1. []; 2. []; 3. [ ]; 4. [ 】.

What are the ways to write php tags?

The operating environment of this article: windows10 system, php 5.4&&php 7, thinkpad t480 computer.

I believe everyone knows that the beginning of php program is

  • Normal writing method

  • echo 1; ?> Short tag writing method, 5.4 Start= 'hello'; === echo 'hello';

  • ## asp style writing

  • Long tag writing method

The differences between different versions are as follows:

The first way is normal writing, there is nothing to say.

The second type requires the directive short_open_tag in the php.ini configuration file to be turned on before it is available, or the --enable-short-tags option is added when compiling PHP. As of PHP 5.4, the short form echo tag = is always recognized and valid, regardless of the short_open_tag setting.

The third method is not recommended. It is a syntactic sugar writing method added for asp programmers to learn php. It needs to be opened through the directive asp_tags in the php.ini configuration file before it can be used.

The fourth type is no longer parsed after php7.0.

Recommended learning:

php training

The above is the detailed content of What are the ways to write php tags?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor