当前位置:网站首页>$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
边栏推荐
- Thymeleaf中使用二维数组[[]]报错:Could not parse as expression
- 【图像融合】基于梯度能量、局部能量、 PCA三种融合规则实现MRI-CT图像融合附matlab代码
- Operation mode and investment planning report of China's financial warehousing industry during the "14th five year plan" period 2022-2027
- Liquid crystal texture diagram of purple solid mm-tpp-10c methacrylic acid decanoxy tetraphenyl porphyrin and mm-tpp-12c methacrylic acid dodecanoxy tetraphenyl porphyrin - Qi Yue display
- Show statement usage supplement
- 网络io,磁盘io
- SQL query statement
- ES字符串类型(Text vs keyword)的选择
- 【路径规划】基于改进人工势场实现机器人路径规划附matlab代码
- Tetra - (4-pyridyl) porphyrin tpyp and metal complexes zntpyp/fetpyp/mntpyp/cutpyp/nitpyp/cotpyp/ptpyp/pdtpyp/cdtpyp (supplied by Qiyue porphyrin)
猜你喜欢

i3wm 获取window class

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

一项听起来大胆,并且非常牛逼的操作——复刻一个 Netflix

MySQL (III)

快速找到优质对象的5种渠道,赶紧收藏少走弯路

Rust中的过程宏

【图像增强】基于人工多重曝光融合AMEF实现图像去雾附matlab代码

Parameter index out of range (0 < 1) (1> number of parameters, which is 0

一文深入底层分析Redis对象结构

【图像融合】基于耦合特征学习的多模式医学图像融合附matlab代码
随机推荐
[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code
China peek market outlook and future strategic planning proposal report 2022-2027
Ppbpi-h-cr, ppbpimn Cr, ppbpi Fe Cr alkynyl crosslinked porphyrin based polyimide material Qiyue porphyrin reagent
Recognize pnpm: faster, higher performance NPM
. Net 20th anniversary! Microsoft sends a document to celebrate
ZRaQnHYDAe
[cellular automata] Based on cellular automata, realize the traffic flow problem of expressway toll station, with matlab code
GMP模型
Big factory interview TCP protocol classic 15 consecutive questions! 22 pictures to make you fully understand
Solve the problem of cross domain invalidation of cookies in the new version of Google Chrome browser
Crosslinked metalloporphyrin based polyimide ppbpi-h) PPBP Mn; PBP-Fe; PPBPI-Fe-CR; Ppbpi Mn CR product - supplied by Qiyue
Oracle中计算除法——解决除数为零报错
Thymeleaf中使用二维数组[[]]报错:Could not parse as expression
Turris omnia: an open source router technology favored by hackers
php array_merge详解
海量日志采集工具——Flume
MySQL 'replace into' 的坑 自增id,备机会有问题
MATLAB线性规划模型学习笔记
Analyze 5 indicators of NFT project
报错问题Parameter index out of range(0 < 1) (1 > number of parameters,which is 0