PHP中定界符的使用注意事项
来源:互联网 发布:hp扫描仪软件 编辑:程序博客网 时间:2024/06/04 19:54
<?php
//1.在开始的定界符中,一定要让定界字符串左边挨着<<<,写结束定界符号时一定要直接回车顶格写(连空格都不可以有);
//2.结束的定界符号要和开始的字符串一致;
//3.使用定界字符时,支持解析双引号和转义字符的功能;
$int=10;
$str1=<<<dingjie
this $int is a demo;
this is a\n test;
this is the\r dingjie.txt;
this is the open ;
dingjie;
echo $str1;
//4.使用定界符号可以有效的阻止因为单双引号嵌套而产生的报错;
//5.要想让定界符号失去双引号的功能,可以使用将开始定界符号加上单引号的方法;
$str2=<<<'hello'
this 'is' $int the two simple;
i 'love\n php';
i "fall in\r love with" study;
A person who know the meaning of studying,he knows the meaning of the life;
hello;
echo $str2;
?>
//1.在开始的定界符中,一定要让定界字符串左边挨着<<<,写结束定界符号时一定要直接回车顶格写(连空格都不可以有);
//2.结束的定界符号要和开始的字符串一致;
//3.使用定界字符时,支持解析双引号和转义字符的功能;
$int=10;
$str1=<<<dingjie
this $int is a demo;
this is a\n test;
this is the\r dingjie.txt;
this is the open ;
dingjie;
echo $str1;
//4.使用定界符号可以有效的阻止因为单双引号嵌套而产生的报错;
//5.要想让定界符号失去双引号的功能,可以使用将开始定界符号加上单引号的方法;
$str2=<<<'hello'
this 'is' $int the two simple;
i 'love\n php';
i "fall in\r love with" study;
A person who know the meaning of studying,he knows the meaning of the life;
hello;
echo $str2;
?>
阅读全文
0 0
- PHP中定界符的使用注意事项
- php中定界符的使用
- PHP 定界符的使用 <<<
- php中<<<定界符
- [转]php中定界符<<<的作用
- PHP <<<EOT定界符的使用详解
- php的<<<(定界符)
- PHP 定界符<<< 使用技巧
- PHP 定界符 使用技巧
- PHP定界符{}的作用
- PHP中单引号,双引号,反引号,定界符的用法
- php 的定界符 <<<eof 的问题
- php 的定界符 <<<eof 的问题
- PHP变量的两种定界符
- PHP定界符
- PHP定界符
- PHP定界符<<<
- php定界符
- Lesson 22 A glass envolops
- 优酷真实视频地址获取方法
- 是时候重构数据访问层的代码了
- [Hackrank] Prime XOR (计数DP)
- 二、计算机的神经网络系统-操作系统
- PHP中定界符的使用注意事项
- SprringMV数据格式化注解
- 南阳理工17题
- 区块链开发专题(P2P技术如何验证消息)
- Linux新手入门:通过chmod改变文件权限
- 一、认识计算机
- PHP实现Unicode和Utf-8编码相互转换
- 使用ajax 实现用户的用户名注册验证,如果该用户已存在则提示该用户已存在
- 170530 逆向-CrackMe(6)