php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80619 New String Operators
Submitted: 2021-01-12 17:24 UTC Modified: 2021-01-12 17:42 UTC
From: 2fby7j8dpm at liamekaens dot com Assigned: cmb (profile)
Status: Wont fix Package: Strings related
PHP Version: Next Major Version OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-01-12 17:24 UTC] 2fby7j8dpm at liamekaens dot com
Description:
------------
Adding some new string operations would be nice:

=. to add a string to the RIGHT of the current string
=.= short for sprintf
.=. to add a string to the right and to the left of the current string


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-12 17:31 UTC] rtrtrtrtrt at dfdfdfdf dot dfd
> =. to add a string to the RIGHT of the current string

yeah, more typo pitfalls

> =.= short for sprintf

to gain what

> .=. to add a string to the right and to the left of the current string

what about $x = "{$y} your-string {$y}"
https://blog.blackfire.io/php-7-performance-improvements-encapsed-strings-optimization.html
 [2021-01-12 17:42 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Package: Unknown/Other Function +Package: Strings related -Assigned To: +Assigned To: cmb
 [2021-01-12 17:42 UTC] cmb@php.net
I don't think that would be reasonable.  If you feel strongly
about it, please pursue the RFC process[1].

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 18:04:14 2021 UTC