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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 23:01:29 2025 UTC