字符串

字符串
  • 转义
    • 当字符串中需要包含符号时,需要在符号之前加一个反斜杠
echo "hello " world"; # Output hello echo "hello \" world"; # Output hello " world

 

  • 换行
echo "hello world"; # Output hello world echo "hello \n world"; # Output hello world

 

  • 单引号中只认两个转义
    • \' -> '
      \\ -? \

       

  • 双引号认识的转义
    • \"
      \n (换行)
      \n (tag制表符)
      ......

       

  • 拼接
$str1 = 'hello';
$str2 = 'world';
$str = $str1.$str2;
echo $str;

 

posted @ 2021-02-13 20:31  Burp  阅读(54)  评论(0)    收藏  举报