相关疑难解决方法(0)

Reference — What does this symbol mean in PHP?

What is this?

This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list.

Why is this?

It used to be hard to find questions about operators and other syntax tokens.¹
The main idea is to have links to existing questions on Stack Overflow, so it's easier for us to reference them, not to copy over content from …

php arguments symbols operators

4314
推荐指数
21
解决办法
63万
查看次数

PHP短标签是否可以使用?

这是根据官方文档的信息:

可以在PHP中使用四对不同的开始和结束标记.其中两个,<?php ?> 并且<script language="php"> </script>始终可用.另外两个是短标签和ASP样式标签,可以从php.ini配置文件打开和关闭.因此,虽然有些人发现短标签和ASP样式标签很方便,但它们的便携性较差,一般不推荐.

在我的经验,大多数服务器启用短标记.打字

<?=
Run Code Online (Sandbox Code Playgroud)

打字要方便得多

<?php echo 
Run Code Online (Sandbox Code Playgroud)

程序员的便利是一个重要因素,为什么不推荐他们?

php coding-style php-shorttags

518
推荐指数
13
解决办法
11万
查看次数