什么是. (点)在PHP中执行? [英] What does a . (dot) do in PHP?
本文介绍了什么是. (点)在PHP中执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下命令在PHP中做什么?
What does the following command do in PHP?
. $string // ($string is something which i declared in the program)
推荐答案
它本身什么也不做(这是无效的语法).但是,如果您有这样的事情:
On its own, that does nothing at all (it's not valid syntax). However, if you have something like this:
<?php
$string1 = "Hello ";
$string2 = "world!";
$string = $string1 . $string2;
echo $string;
?>
您将看到Hello world!
. .
是字符串连接运算符.
You will see Hello world!
. The .
is the string concatenation operator.
这篇关于什么是. (点)在PHP中执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文