Home > Backend Development > PHP Problem > What are the ways to write php tags?

What are the ways to write php tags?

王林
Release: 2023-03-13 06:56:01
Original
6425 people have browsed it

There are four ways to write the

php tag, namely: 1. []; 2. []; 3. [<% echo=""> ]; 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

  • Short tag writing method, 5.4 Start

  • ##<% echo 1; %> 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

    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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template