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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

Add a Patch

Pull Requests

Add a Pull Request

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: Wed Apr 24 23:01:34 2024 UTC