php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12244 Short form of if-clause
Submitted: 2001-07-19 04:12 UTC Modified: 2001-07-19 04:31 UTC
From: soenke at topconcepts dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: RedHat Linux 7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: soenke at topconcepts dot com
New email:
PHP Version: OS:

 

 [2001-07-19 04:12 UTC] soenke at topconcepts dot com
Hi there,

not a bug, but a suggestion:

if ($foo==4) $foo=3;

in short form:

$foo==4 ? $foo=3 : 1;

it would be nice if that where possible:

$foo==4 ? $foo=3; (without else string)

i didnt know where to post else. please cc to me cauze i'm not on the list.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-19 04:31 UTC] cynic@php.net
please read the trinary op. man page carefully. you obvously misunderstood its purpose.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 18:01:34 2024 UTC