php - PHP 的 ASP 和 script 标签是否去掉

标签 php

我正在研究 PHP 5.3。然而,在查看 PHP manual 时,我发现最新手册中只记录了标准标签和短标签。脚本和 ASP 标签没有记录。我知道不推荐使用它们,我也不使用它们。只是询问信息。

在最新的手册中,没有关于asp 标签和script 标签的内容。所以我相信它们在最新版本的 PHP 中被删除但无法验证。我试图查看更改日志,但找不到它们是否被删除,如果是,何时删除。

如果他们在最新版本的 PHP 中仍然受支持(即使贬值),有人可以回答吗?如果没有,它们在哪个版本中被折旧以及何时被完全删除?

最佳答案

天哪,我以前都不知道可以用ASP标签..

无论如何,我不知道您正在看哪个版本的手册,但是看这里:

http://us1.php.net/manual/en/ini.core.php#ini.asp-tags

对于速记标签,它说:

Note: This directive also affected the shorthand <? echo. Use of this shortcut required short_open_tag to be on. Since PHP 5.4.0, <?= is always available.

对于脚本和 ASP :(示例二是脚本)

http://us1.php.net/manual/en/language.basic-syntax.phpmode.php

While the tags seen in examples one and two are both always available, example one is the most commonly used, and recommended, of the two.

Short tags (example three) are only available when they are enabled via the short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option.

ASP style tags (example four) are only available when they are enabled via the asp_tags php.ini configuration file directive.

所以本质上,如果文档是正确的,并且更新了 - ,它们还没有被弃用。

更多信息在这里:Are PHP short tags acceptable to use?

[重复?]

关于php - PHP 的 ASP 和 script 标签是否去掉,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22267458/

相关文章:

php - 此路由不支持 DELETE 方法。支持的方法 : GET, HEAD、POST。在拉拉维尔 7'

php - 基本 PHP 注册/登录系统

php - 如何过滤这个多维数组?

javascript - 调用 laravel {{action(Controller@method}} 并从 vue.js 数组传递变量

php - 从 PHP 页面记录 MySQL 响应

php - javascript php数组

php - mysql选择范围内的最后x天

php - CodeIgniter Active Record 一次删除多条记录

php - Laravel JWT - 使用 Javascript 使用你自己的 API

php - 在 pg_query() 问题中使用 AND 语句