---
title: "Discussion on \"How the PHP or (||) Operator Works\" | Hashnode"
description: "Discussion on \"How the PHP or (||) Operator Works\". Actually, PHP or (||) is a logical operator used to give you a true result if one of operands is correct.\nThe syntax of or operator like the below .\n<?php \noperand_1 || operand_2\n\n// => or\n\noperand_1 or operand_2\n?>\n\nSo when you use it with if condit..."
url: "https://hashnode.com/posts/how-the-php-or-operator-works/637e276d00221a00d195a054"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How the PHP or (||) Operator Works](https://codeweb.hashnode.dev/how-the-php-or-operator-works?utm_source=hashnode&utm_medium=feed)

Actually, PHP or (||) is a logical operator used to give you a true result if one of operands is correct. The syntax of or operator like the below . <?php operand\_1 || operand\_2 // => or operand\_1 or operand\_2 ?> So when you use it with if condit...

Nov 23, 2022 · 2 min read · codeweb.hashnode.dev  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#php7](https://hashnode.com/tag/php7)

## Written by

[Greg Bulmash](https://hashnode.com/@Bulmash)

@Bulmash

  
[View profile](https://hashnode.com/@Bulmash)

programming

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
