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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sat Dec 21 15:01:29 2024 UTC