php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30008 string prepend operator would be Very handy!
Submitted: 2004-09-07 12:34 UTC Modified: 2004-09-07 13:24 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: k at krisgale dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: Irrelevant OS:
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: k at krisgale dot com
New email:
PHP Version: OS:

 

 [2004-09-07 12:34 UTC] k at krisgale dot com
Description:
------------
with regard to assignment operators...
there exists the string append operator .=
what would be very handy is a prepend operator =.
i.e.
$a = "a";
$b = "b";
$ab = $b;
$ab =. $a;
echo $ab; // "ab"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-07 12:57 UTC] derick@php.net
Not a bug, but a feature request. But something that won't be implemented as it would be way to confusing (and PHP != Perl).
 [2004-09-07 13:01 UTC] k at krisgale dot com
[shrug] to me, it was worth asking :)
apologies for not finding a 'feature request' form on the site.
there's an operator such as this in perl?
i was unaware (i skipped perl on my way past jsp and coldfusion).
 [2004-09-07 13:24 UTC] k at krisgale dot com
looking at it again, i could see how =. would be Very confusing...

is #= in use for anything?

i'll stop my filibustering here since, as you said, this is a feature request not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC