我可以这样:
php>multline start;
.... $a =<<< EOF
.... hello hi how are you this is phpSH
.... hello there its test line
.... EOF;
.... multiline end;
在 phpsh 中?
我可以这样:
php>multline start;
.... $a =<<< EOF
.... hello hi how are you this is phpSH
.... hello there its test line
.... EOF;
.... multiline end;
在 phpsh 中?
举个例子,if 多行语句:
您可以通过按 ctrl + c 进一步取消写入。
也许就像这样:
php> $test = "
... hello hi how are you this is phpSH
... hello there its test line
... "
<the_empty_result>
php>
php> echo $test
hello hi how are you this is phpSH
hello there its test line
php>
php> =$test
"\nhello hi how are you this is phpSH\nhello there its test line\n"
或者
php> $test = "hello hi how are you this is phpSH
... hello there its test line"
<the_empty_result>
php>
php> echo $test
hello hi how are you this is phpSH
hello there its test line
php>
php> =$test
"hello hi how are you this is phpSH\nhello there its test line"
当然,按Enter创建上面的多行输入。