Req #66832 [NEW]: Feature: Reverse assignment string operators

From: Date: Thu, 06 Mar 2014 09:50:25 +0000
Subject: Req #66832 [NEW]: Feature: Reverse assignment string operators
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184552@lists.php.net to get a copy of this message
From: nicolas dot giraud dot dev at gmail dot com Operating system: All PHP version: Irrelevant Package: Strings related Bug Type: Feature/Change Request Bug description:Feature: Reverse assignment string operators Description: ------------ This is not a bug but a feature request. I thought someone already asked it but I wasn't able to find anything like that. I would like to know if it's possible to have reversed assignment string operator. Thank you Test script: --------------- $a =. $b; // same as $a = $b . $a; Expected result: ---------------- $a = 'World'; $b = 'Hello '; $a =. $b; //$a worth now "Hello World"; //Multiple string operations in assignements $a = 'a'; $b = 'b'; $c = 'c'; $c .= $b .= $a; //$c worth now 'cba' $a = 'a'; $b = 'b'; $c = 'c'; $c =. $b =. $a; //$c worth now 'abc' Actual result: -------------- Not implemented (yet?) Only the following snippet works: $a = 'a'; $b = 'b'; $c = 'c'; $c .= $b .= $a; //$c worth now 'cba' -- Edit bug report at https://bugs.php.net/bug.php?id=66832&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66832&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66832&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66832&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66832&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66832&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66832&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66832&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66832&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66832&r=support Expected behavior: https://bugs.php.net/fix.php?id=66832&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66832&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66832&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66832&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66832&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66832&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66832&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66832&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66832&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66832&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66832&r=mysqlcfg

« previous php.bugs (#184552) next »