php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72022 Typo in Ternary Operator documentation
Submitted: 2016-04-14 02:46 UTC Modified: 2016-04-14 02:52 UTC
From: t dot sasaki at ebisol dot co dot jp Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: t dot sasaki at ebisol dot co dot jp
New email:
PHP Version: OS:

 

 [2016-04-14 02:46 UTC] t dot sasaki at ebisol dot co dot jp
Description:
------------
---
From manual page: http://php.net/manual/en/language.operators.comparison.php
---

Ternary Operator documentation includes following sentence.

'Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.'

That should be like below.

'Expression expr1 ?: expr3 returns expr2 if expr1 evaluates to TRUE, and expr3 otherwise.'


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-14 02:50 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-04-14 02:50 UTC] requinix@php.net
There is no expr2 in "expr1 ?: expr3". What it says now is correct.
 [2016-04-14 02:52 UTC] t dot sasaki at ebisol dot co dot jp
-Status: Not a bug +Status: Closed
 [2016-04-14 02:52 UTC] t dot sasaki at ebisol dot co dot jp
Sorry, this is my misunderstading.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Sep 23 02:01:27 2024 UTC