Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
479 views
in Technique[技术] by (71.8m points)

这种没有if的判断语句怎么理解

$data ['ToUserName'] == 'gh_3c884a361561' || $this->init_follow ( $data );

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

$data ['ToUserName'] == 'gh_3c884a361561'为真就取$data ['ToUserName']= 'gh_3c884a361561'为结果,注意是“=”,接着舍弃$this->init_follow ( $data )

$data ['ToUserName'] == 'gh_3c884a361561'为假就舍弃$data ['ToUserName']== 'gh_3c884a361561',接着判断$this->init_follow ( $data ),如果这个为真,那就获取init_follow()这个函数返回的结果


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...