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
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: 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 23:01:28 2024 UTC