Sign in
Log inSign up

Which 'if' is good in PHP?

Chuoke ChungYoung's photo
Chuoke ChungYoung
·Jan 18, 2018

if ($condition) { $x = $v; }

88%

$condition && $x = $v;

5%

$condition AND $x = $v;

3%

Others

5%

40 votes · Closed

What you like use in some simple cases? Here's what I know. Is there any other way? Tell me.

And which is good?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct