吃维生素e软胶囊有什么好处| 脑梗的前兆是什么| 家庭长期饮用什么水最好| 鱼不能和什么食物一起吃| b驾照能开什么车| 学考成绩什么时候公布| 扪及是什么意思| 小山羊是什么病| 买车选什么品牌| 前列腺炎需要做什么检查| 鸡枞菌长在什么地方| 为什么身体没力气也没有精神| 说一个人轴是什么意思| 日本人什么时候投降的| 恍惚是什么意思| 龋齿和蛀牙有什么区别| 过期葡萄酒有什么用途| 梦见洗碗是什么预兆| 活色生香的意思是什么| 冒犯是什么意思| 带鱼为什么是扁的| 公务员做什么工作| 肩膀骨头疼是什么原因| 碧血是什么意思| 姑息治疗什么意思| 上火耳鸣吃什么药最好| 梵蒂冈为什么没人敢打| 甘是什么意思| 梦见吃杨梅是什么意思| 剪切是什么意思| 手没有力气是什么原因| 什么食物最养胃| 流火是什么原因造成的| 养精蓄锐是什么意思| 捋捋是什么意思| 脚底烧热是什么原因| 科目一和科目四有什么区别| 占有欲强是什么意思| 梦见狗咬手是什么意思| 点痣后用什么修复最好| 日本买房子需要什么条件| 脚麻是什么原因造成的| 虚岁30岁属什么生肖| 梦见打蛇是什么预兆| 周二右眼皮跳是什么预兆| 过命之交是什么意思| 阴道炎有些什么症状| 68岁属什么| 红参和人参有什么区别| fmp是什么意思| sc是什么意思| co2是什么| mcv是什么意思| 通草和什么炖最催奶了| 劫财代表什么| 毛囊炎吃什么药| 肝肾不足是什么意思| 常喝苦荞茶有什么好处| 迫切是什么意思| 路人甲什么意思| 人鱼线是什么| 肌肉抽筋是什么原因| 梦见吃酒席是什么预兆| 满月脸是什么意思| 尿为什么是黄色的| 半夜三更是什么生肖| 什么蔬菜含维生素c最多| 黄体回声是什么意思| 男士阴囊痒用什么药膏| 黄五行属什么| 失眠吃什么药| 国家三有保护动物是什么意思| 老年阴道炎用什么药| 阴道长什么样| 天丝是什么材料| 什么蔬菜补血| 身份证什么时候可以办| 女人体检都查什么项目| 吉利丁片是什么东西| 黄鳝喜欢吃什么| 半夜会醒是什么原因| 礼金是什么意思| 为什么老是说梦话| 玉兰花什么时候开| 头皮痒掉发严重是什么原因| 狐臭什么味道| 榨菜的原料菜叫什么| b2b是什么| 钠是什么东西| 签注是什么| 中国第一艘航空母舰叫什么| 耳道湿疹用什么药| 竖心旁有什么字| 女人得性瘾什么症状| vca是什么牌子| 皮肤黏膜是什么| 藏红花的功效是什么| 宝宝打嗝是什么原因| 什么一梦| 词牌名是什么意思| 肝功能异常是什么意思| 小孩突然头疼是什么原因| 怀孕感冒了有什么好办法解决| 湿热便秘吃什么中成药| 梅花鹿吃什么| 牛角尖是什么意思| 板命什么意思| 口水分泌过多是什么原因| 白羊座是什么性格| 为什么一进去就射了| 什么是特需门诊| 用一什么就什么造句| 1963年属什么生肖| 矬是什么意思| 斑是什么原因造成的| 什么是造影| 脚趾缝脱皮是什么原因| 菊花和枸杞泡水喝有什么功效| 玉米有什么功效| 发低烧吃什么药| 追求完美的人什么性格| 吃完麻辣烫吃什么补救| 什么呀| gcp是什么| 血脂高低看什么指标| 侄子叫我什么| 妊娠囊是什么意思| mgd是什么意思| 阿托品是什么药| 什么是血铅| 身旺是什么意思| 小孩吃什么能长高| 肝钙化是什么意思| 紫苏叶有什么作用| 什么是干眼症| 蔓越莓对女性妇科有什么好处| 末梢血是什么意思| 肝不好有什么症状有哪些表现| 头伏饺子二伏面三伏吃什么| 一见倾心什么意思| 什么是升华| 御三家是什么意思| 什么治咳嗽最快最有效| 内秀是什么性格的人| 硬座是什么意思| 小肚子发胀是什么原因女性| 失眠吃什么食物最有效| 荨麻疹挂什么科| 感冒不能吃什么水果| 面色晄白是什么意思| 口腔医学是干什么的| 检查肺结节挂什么科| 长期胃胀是什么原因| 赤色是什么颜色| 猪肚炖什么好吃| 什么蛇没毒| 什么是埋线双眼皮| 儿童矮小挂什么科| 孕妇甲胎蛋白偏高说明什么| 98什么意思| 司南是什么| 非淋菌尿道炎用什么药| 鸡黍是什么意思| 骨质疏松用什么药好| 7月15日是什么节日| 肩膀疼痛挂什么科| 起风疹了用什么快速方法能解决| 什么是凌汛| 原发性高血压是什么意思| 再三的意思是什么| 蛋蛋冰凉潮湿什么原因| alt是什么意思| 什么人容易心梗| 6朵玫瑰代表什么意思| 舌根部淋巴滤泡增生吃什么药| 什么人不怕冷| 泥鳅喜欢吃什么食物| 吃什么能治白头发| 香醋和陈醋有什么区别| 黄体酮吃多了有什么副作用| 黑色鸟是什么鸟| apn是什么意思| 羊水指数是什么意思| 用什么泡脚去湿气寒气| 窜稀是什么意思| 绿豆不能和什么一起吃| 一个口一个有念什么| 筹钱是什么意思| 水瓶男和什么座最配| 俞字五行属什么| 枕秃是什么意思| 武汉什么省| 胸闷什么原因| 愤是什么生肖| 煮牛骨头放什么调料| 摩羯男和什么星座最配| 吃什么药可以延长性功能| 什么梗| 节操是什么意思| 阴险是什么意思| 什么叫做洗钱| 羊的尾巴有什么作用| yuki是什么意思| 忆苦思甜下一句是什么| 热泪盈眶的盈是什么意思| 过敏性皮炎用什么药膏| 金字旁加全字念什么| 绾色是什么颜色| 地盆是一种什么病| 良人什么意思| 暖气是什么症状| 盐水是什么| 跳蛋是什么| 5岁属什么生肖| 昭是什么意思| 眼下长斑是什么原因| CRL是胎儿的什么意思| 天蝎座男生喜欢什么样的女生| 吃什么水果解酒| 慢性咽炎吃什么药效果最好| 什么app可以买烟| 牛肉可以炖什么| 用盐袋子热敷小肚子有什么功效| 妄想是什么意思| 排班是什么意思| 痛点是什么意思| ky什么意思| 腋下疼痛什么原因| 今天什么冲什么| 精益求精的意思是什么| XXJ什么意思| 上热下寒吃什么药| 肾功能挂什么科| 第一次见家长送什么礼物好| 嬴稷是秦始皇的什么人| 蒲地蓝消炎片主治什么| 什么叫平仓| 肝癌有什么症状| 艾斯挫仑是什么药| 缅甸的首都叫什么名字| 比利时说什么语言| 吃叶酸有什么好处| 裘是什么意思| 手上长痣代表什么| 牛肉馅饺子配什么菜| 劲酒有什么功效| 什么是传染病| 脉搏快是什么原因| 海龙是什么| 胆汁反流是什么原因| 什么是骨癌| 广东属于什么气候| 拔罐后发痒是什么原因| 心电图窦性心动过速是什么意思| 总是想睡觉是什么原因| 什么病能办低保| 什么情况下喝补液盐| 什么是三宝| 空调干燥是什么意思| 秦始皇为什么叫祖龙| 上腹疼是什么原因| 便秘是什么原因引起的| 胎头位于耻上是什么意思| 什么情况下要打破伤风| 百度
PHP 5 data type...LOGIN

【阅微】“家之书”第一集:一封来不及寄出的家书

百度 城市学起源于欧洲,发展于美国和日本,因此,在学习国外城市学理论的同时,一定要结合本国特点,将其本土化。

PHP’s data types include the following,

Integer (integer type)

String(String)

Float(Float type),

Boolean(Boolean type)

Array(array)

Object(object)

NULL(null value)


View data type

1. gettype (pass in a variable) can get the type of the variable

2. var_dump (pass in a variable) output variable type and value (most commonly used)

var_dump() is a function. Insert variables between brackets (). This function will print out the data type and also display the length and value of the variable accordingly.


##Integer type (int)

So-called integer type , which is the integer that everyone learns in mathematics.

Integer type——Integer, also known as integer in English. English abbreviation: int

The integer type is divided into :

1. 10-base system

2.

8-base system ( Understand, basically don’t use it)

3.

16 base (Understand, basically don’t use it)

Octal system declaration: starts with 0, followed by an integer from 0 to 7 (Understand knowledge points)

Hexadecimal declaration: Starting with 0x, followed by 0-f, the abcdef of 0x is not case-sensitive. (Understand knowledge points)

Integer rules:

· An integer must have at least one digit (0-9)

· The integer cannot contain commas or spaces

· The integer cannot have a decimal point

· The integer can be positive or negative

· The integer can be specified in three formats: decimal, hexadecimal System (prefix is ??0x) or octal (prefix is ??0)


#Example
In the following example we will test different numbers.

<?php
 $x = 5985;     //十进制
 var_dump($x);
 echo "<br>";
 $x = -345; // 负数
 var_dump($x);
 echo "<br>";
 $x = 0x8C; // 十六进制数
 var_dump($x);
 echo "<br>";
 $x = 047; // 八进制数
 var_dump($x);
 ?>


##String


Strings are all our visible and invisible characters. They are what we say in daily life. What I want to say is: "Li Wenkai is so handsome." ” or “Sister Feng, I love you!” Strings are all the characters that people can see that I want to express.

For example, you can see the characters:

I would like to become you, the prince you love, a house, a car and money, in a fairy tale. <html><title></title></html> ^@@@#@ my name is xiaoshenyang

and above text, HTML tags, special characters and English, etc., we all Think it is a string

There are three ways to declare a string in PHP language:

1. Use single quotes to declare

2. Use double quotes to declare

3. Use character delimiters Statement (used when a very large string needs to be entered)

1.Single quote statement Use English half-foot single quotes to wrap the string, as follows:

$zifuchuan= 'I am a single quote';

1. Double quote statement Add double quotes on both sides of the string, as follows:

$zifuchuan= "I am double quotes";

3. Character declaration
1). Write three less than signs (<<<) after the equal sign after the variable.

2). Then write characters after <<< (English uppercase characters are recommended). As in the following example: ABC

3). Then change the line and write any characters you want

4). After writing, go to the top line. At the beginning of the line, write the characters following <<< and a semicolon. As in the following example: ABC;

<?php

$dingjie = <<<ABC
If
It must be here Roll the calf
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Far, get as far away from me</h1>
ABC;
?>




##Example


In the following example, we will output a string.

<?php
 $x = "Hello world!";
 echo $x;
 echo "<br>";
 $x = 'Hello world!';
 var_dump($x) ;
 ?>

##Float


The so-called floating point type can be understood as: the decimal in our mathematics.
Example

We use echo and Print to output floating point types respectively

<?php
 //声明变量fudian的值为12121.3132
 $fudian = 12121.3132;
 echo $fudian;
 echo "<br>";
 //声明变量$fl 的值为0.8873
 $fl = 0.8873;
 var_dump($fl);
 ?>
echo directly outputs 12121.3132, and var_dump The output is 0.8873, and it also shows that the type of variable $fl is float.

##Boolean type(bool)


The Boolean type is: true and false. The translation of true and false in English is: · true (true)
· false (false)

Therefore, we can do this in the PHP code statement.

<?php
//Declare a variable (Pinyin) as Boolean
$buer = true;
//State a variable (English)
$bool = false;
?>
Note: Do not add quotation marks around for true and false.


#Array

An array stores multiple values ??in a variable. Think like this:

<?php
 $cars=array("Volvo","BMW","SAAB");
 var_dump($cars);
 ?>

You will learn more about arrays later in this tutorial.


Object (Object)

The object is to store data data type and information about how to process the data.

In PHP, objects must be declared explicitly.

First we must declare the class of the object. For this we use the class keyword. A class is a structure containing properties and methods.

Then we define the data type in the object class and then use this data type in instances of that class:

<?php class Car
{
var $color;
function Car($color="green") {
$this->color = $color;
}
function what_color() {
??????????? return $this->color;
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????Knowledge about objects, just know it now


#NULL (null value)


Empty means null in English, which means nothing. Null is not false, not 0, and not a space.

There are three main situations that will produce a null type: 1. The value of a variable explicitly specified as NULL through variable assignment
2. A variable has no Give any value

3. Use the function unset() to destroy the variable

Let’s demonstrate it with code

<?php
 //声明变量为null
 $n = null;
 var_dump($n);
 
 //var_dump显示输出变量$meiyou,看看结果是什么?
 var_dump($meiyou);
 
 //声明一个变量$iphone的值为字符串的手机
 $iphone = '手机';
 //unset销毁掉一个变量
 unset($iphone);
 var_dump($iphone);
 ?>

Next we will explain two things related to null Functions, these two functions are very commonly used.

empty()

You can pass a variable into the middle of the brackets. If the value of this variable is false or null, it returns true.

Example

<?php
 header("Content-type:text/html;charset=utf-8"); //设置utf-8编码
 $apple = null;
 if(empty($apple)){
     echo '执行了真区间';
 }else{
     echo '行了假区间';
 }
 ?>

##The above experiment proves that $apple is null. Place the apple in the middle of empty. The result is a true interval.


isset()You can pass one or more variables into the middle of the brackets, and separate variables with commas. As long as there is a variable that is null, it returns false. Otherwise, returns true.

Example

<?php
 $one = 10;
 $two = false;
 $three = 0;
 $four = null;
 $result = isset($one , $two , $three , $four);
 //执行看看结果,是不是
 var_dump($result);
 ?>


##unset()The function of this function is to destroy variables. Insert the variable name you want to destroy between the unset (variable) brackets, and the variable will be destroyed.


Next Section

<?php $x = 5985; //十进制 var_dump($x); echo "<br>"; $x = -345; // 负数 var_dump($x); echo "<br>"; $x = 0x8C; // 十六进制数 var_dump($x); echo "<br>"; $x = 047; // 八进制数 var_dump($x); ?>
submitReset Code
ChapterCourseware
什么是间质性肺炎 股票洗盘是什么意思 什么是崩漏 什么颜色对眼睛有好处 夏季风寒感冒吃什么药
碧螺春是什么茶 蒲公英泡水喝有什么功效 ads是什么 病毒五项检查的是什么 出征是什么意思
生命的本质是什么 心肌酶高是什么意思 小孩尿酸高是什么原因 no.是什么意思 1109是什么星座
80岁称什么之年 耵聍栓塞是什么意思 耳机戴久了有什么危害 豌豆荚是什么 就义是什么意思
什么耳什么腮hcv9jop3ns4r.cn 话糙理不糙是什么意思hcv9jop4ns1r.cn 海马用什么呼吸hcv8jop8ns7r.cn 贫血喝什么口服液hcv8jop1ns3r.cn 嗳腐吞酸是什么意思hcv7jop7ns0r.cn
二月春风似剪刀的上一句是什么beikeqingting.com 农历七月初七是什么节日hcv9jop3ns7r.cn 脸上发红是什么原因hcv9jop3ns7r.cn 无济于事的济是什么意思hcv8jop7ns4r.cn 夜游神是什么意思hcv8jop4ns0r.cn
为什么一直睡不着hcv8jop0ns8r.cn hdl是什么意思hcv9jop5ns4r.cn 水漂是什么意思hcv8jop6ns3r.cn 且行且珍惜什么意思hcv9jop0ns2r.cn 传字五行属什么hcv9jop5ns4r.cn
左侧卵巢内囊性回声是什么意思hcv9jop4ns5r.cn mds是什么病的简称luyiluode.com 鼻窦炎是什么原因引起的呢hcv9jop4ns6r.cn 10月24号是什么星座hcv8jop7ns7r.cn 丘比特是什么意思hcv7jop6ns3r.cn
百度