php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75233 want a new opperator ?=
Submitted: 2017-09-20 13:32 UTC Modified: 2017-09-20 17:32 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:0 of 1 (0.0%)
From: uukoo at 163 dot com Assigned: cmb (profile)
Status: Closed Package: *General Issues
PHP Version: 7.2.0RC2 OS:
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: uukoo at 163 dot com
New email:
PHP Version: OS:

 

 [2017-09-20 13:32 UTC] uukoo at 163 dot com
Description:
------------
what we have
$a?:$b ==== $a?$a:$b
$a??$b ==== isset($a)?$a:$b

what we want
$a?=$b ==== isset($a)?$a:($a=$b)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-20 16:05 UTC] cmb@php.net
-Package: PHP Language Specification +Package: *General Issues
 [2017-09-20 17:32 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2017-09-20 17:32 UTC] cmb@php.net
A respective RFC for implementing an null coalesce operator (??=)[1] has already
been accepted, but nobody found the time to implement that feature, yet. A pull
request would be welcome!

[1] <https://wiki.php.net/rfc/null_coalesce_equal_operator>
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 09:00:02 2026 UTC