我可以这样:
php>multline start;
.... $a =<<< EOF
.... hello hi how are you this is phpSH
.... hello there its test line
.... EOF;
.... multiline end;
在phpsh中?
答案 0 :(得分:0)
让我们举一个例子,如果是多行语句:
您可以通过按ctrl + c进一步取消写入。
答案 1 :(得分:0)
也许就像这样:
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 创建上述多行输入。