Blogger Information
Blog 87
fans 0
comment 0
visits 59061
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
第三章:1.变量的运算
黄忠倚的博客
Original
616 people have browsed it

实例

<?php
echo '<h2>1.变量的运算</h2>';
echo '<hr color="red">';

/医院
 * 1.算术运算:int,float, + _ * / %
 * 2.逻辑运算:boolean,true,false,  and or not
 * 3.字符运算:string, .
 */

var_dump(5+10);
echo '<hr>';
var_dump(3.14*5*5);
echo '<hr>';
var_dump(100>90);
echo '<hr>';
var_dump(100>90 && 30 >= 50);
echo '<hr>';

var_dump(true && false);  //逻辑与 理解为*
echo '<hr>';

var_dump(true || false);  //逻辑与 理解为+
echo '<hr>';

var_dump(!true);  //逻辑非
echo '<hr>';

var_dump(!false);  //逻辑非
echo '<hr>';

$siteName = 'PHP中文网';
$course = 'PHP编程技术';

// echo '欢迎来到:'.$siteName.'学习:'.$course;
echo "欢迎来到:{$siteName}学习:{$course}";

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post