当前位置:网站首页>$a && $b = $c what???
$a && $b = $c what???
2022-06-26 07:07:00 【Talk to me】
$a && $b = $c;$a = 1;
$b = 2;
$c = 3;
$a && $b = $c;
echo "a:$a";
echo "b:$b";
echo "c:$c";// This is a
a:1
b:3
c:3
$a = 0;
$b = 2;
$c = 3;
$a && $b = $c;
echo "a:$a";
echo "b:$b";
echo "c:$c";// This is a
a:0
b:2
c:3
analysis :
- && And assignment operators “=” The priority of is && High priority , But the reddened writing is not $a and $b First do the sum operation, and then =$c, This understanding is equivalent to 1=$c, and 1=$c It's wrong to write like this
- The correct understanding of this alternative way of writing is :
if($a){$b = $c}, That is, if $a It's true , Then execute the assignment statement $b = $c; Otherwise, the assignment statement will not be executed , The result is not hard to understand
边栏推荐
- Dark red crystal meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin (co TAPP); Meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin no complex (TAPP co no) supplied by Qiyue
- Research Report on market development prospect and investment strategy of China's water soluble film industry 2022-2027
- MySQL 'replace into' 的坑 自增id,备机会有问题
- What is deadlock
- Operation mode and investment planning report of China's financial warehousing industry during the "14th five year plan" period 2022-2027
- Porphyrin based polyimide (ppbpis); Synthesis of crosslinked porphyrin based polyimides (ppbpi CRS) porphyrin products supplied by Qiyue biology
- Solve the problem of transparency at the bottom of dialog
- Massive log collection tool flume
- Easyar use of unity
- China polyimide film market demand and future investment risk outlook report 2022-2027
猜你喜欢

PyTorch搭建CNN-LSTM混合模型实现多变量多步长时间序列预测(负荷预测)

Big factory interview TCP protocol classic 15 consecutive questions! 22 pictures to make you fully understand

安装homebrew报错汇总

Professional course - Code question record

MySQL

Here comes the apple ar/vr device exclusive system! Or named realityos

海量日志采集工具——Flume
![[004] [stm32] MDK project configuration and commissioning](/img/a8/9817cdbbce557a92739de494490706.jpg)
[004] [stm32] MDK project configuration and commissioning

Deep exploration image theme color extraction

Shengshi Haotong enterprise wechat sector creates a digital ecological community
随机推荐
SQL中空值的判断
i3wm 获取window class
【yolov4】基于yolov4深度学习网络目标检测MATLAB仿真
How to open an account in flush? Is it safe to open an account online?
[cellular automata] Based on cellular automata, realize the traffic flow problem of expressway toll station, with matlab code
MATLAB线性规划模型学习笔记
Typescript: use polymorphism instead of switch and other conditional statements
Turris omnia: an open source router technology favored by hackers
Zraqnhydae
Meso tetra (4-bromophenyl) porphyrin (tbpp); 5,10,15,20-tetra (4-methoxy-3-sulfonylphenyl) porphyrin [t (4-mop) ps4] supplied by Qiyue
一芯实现喷雾|WS2812驱动|按键触摸|LED显示|语音播报芯片等功能,简化加湿器产品设计
专业课-代码题记录
Redis系列——5种常见数据类型day1-3
二叉树中和为某一值的路径(一)(二)(三)(剑指offer)
Professional course - Code question record
Service interface test guide
Stm32f1 and stm32subeide programming example - thermal sensor driver
Massive log collection tool flume
【特征提取】基于稀疏PCA实现目标识别信息特征选择附matlab源码
Deep exploration image theme color extraction