模式匹配/(\S+)\/\S+/和/\S+\/(\S+)/有什么区别;
2 回答

德玛西亚99
TA贡献1770条经验 获得超3个赞
如果大括号内是标量变量的话,那这里的作用就是限定变量界限的。在[$a = "--${Str}\r\n"和$a = "--$Str\r\n"有什么区别]里是没有什么区别的。
$str = 'my name';$strstr='your name';echo "${str}str is hello"; //my namestr is helloecho "$strstr is hello"; //your name is helloecho "$strabc is hello"; // Undefined variable: strabc in {}的作用是限制变量名。
添加回答
举报
0/150
提交
取消