php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #169 if/then/else
Submitted: 1998-03-14 00:30 UTC Modified: 1998-03-14 01:42 UTC
From: jon at clearink dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Latest CVS OS: solaris 2.5.1
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: jon at clearink dot com
New email:
PHP Version: OS:

 

 [1998-03-14 00:30 UTC] jon at clearink dot com
this works:
$sM->getAction() == "" ? $sM->setAction ( $mainmenu ) : $foo = $bar;

this doesn't:
$sM->getAction() == "" ? $sM->setAction ( $mainmenu );


foo/bar don't even exist

i don't need an else in this case

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-14 01:42 UTC] zeev
The ? is a trinary operator, whether you need an else-part
or not.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC