前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Zend PHP5笔记

Zend PHP5笔记

作者头像
lilugirl
发布2019-05-26 21:16:08
8270
发布2019-05-26 21:16:08
举报
文章被收录于专栏:前端导学前端导学

PHP Basics

四种标签 Standard Tags ,Short Tags,Script Tags,ASP Tags

Standard Tags <?php ... code ?>

Short Tags <? ... code ?>

<?= $variable ?> Script Tags <script language=“php”> ... code </script>

ASP Tags <% ... code %>

换行符问题: Newlines are, normally, ignored by browsers, as they are non-semantic characters in HTML. However, they are also used as separators between the header portion of a web server’s HTTP response and the actual data; therefore, outputting a newline character before all of the headers have been written to the output can cause some rather unpleasant (and unintended) consequences.

An easy way to prevent spurious output from an include file is to omit the closing tag

at the end, which the parser considers this perfectly legal.

Language constructs 语言结构 语言结构:就是PHP语言的关键词,语言语法的一部分; 它不可以被用户定义或者添加到语言扩展或者库中;它可以有也可以没有变量和返回值。 函数: 由代码块组成的,可以复用。 更多http://blog.sina.com.cn/s/blog_475429950100hk75.html die() 是exit()的别名,属于语言结构

echo 和print

It’s important to understand that echo is not a function and, as such, it does not have

a return value. If you need to output data through a function, you can use print()

instead:

echo 10;

print (10);

Data Types 数据类型 they are generally divided in two categories:scalar and composite. 标量和符合类型 更多http://sjolzy.cn/PHP-data-type-of-scalar-data-types-into-complex-data-types-special-data-types.html

4种标量类型

boolean :A value that can only either be true or false

int :A signed numeric integer value

float :A signed floating-point value

string :A collection of binary data

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档