翻身的废鱼——论PHP从入门到放弃需要多久?4
2021-07-02 00:03
标签:php 今日课程:PHP 3天基础巩固视频教程【燕十八】 1、算术运算符/加减乘除等,除数不能为0 2比较运算符 $a = 5; $b = 3; $c = ($a > $b); var_dump($c); echo ‘ $c = ($a == $b); var_dump($c); echo ‘ //全等于 $a = 5; $b = ‘5‘; var_dump($a == $b); var_dump($a === $b); echo ‘ //全等于要求类型和值都想等 //面试题 $a = 0;//1 2 3 false if($a === false){ echo ‘没找到‘; }else{ echo ‘找到了‘; } 3三元运算符 //三元运算符 //给定2个数,找比较大的 $a = 5; $b = 10; $c = null; if($a >= $b){ $c = $a; }else{ $c = $b; } var_dump($c); $c = ($a >= $b? $a : $c); var_dump($c); echo ‘ 4逻辑运算符 //逻辑运算符 //有房有车才可嫁 $h = true; $c = true; if($h === true){ if($c === true){ echo "嫁"; }else{ echo "遗憾"; } } if(($h == false)&&($c == true)){ echo ‘嫁‘; }else{ echo ‘遗憾‘; } 第四天了,今天学的少,主要是困得慌,还是没放弃 本文出自 “一条大大大大废鱼” 博客,谢绝转载! 翻身的废鱼——论PHP从入门到放弃需要多久?4 标签:php 原文地址:http://lonelyman.blog.51cto.com/9706318/1945170
‘;
‘;
‘;
‘;