php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64245 concatenating reference & string is confusing
Submitted: 2013-02-19 17:00 UTC Modified: 2013-02-19 17:14 UTC
From: fool at example dot com Assigned:
Status: Closed Package: Variables related
PHP Version: 5.4.11 OS: archlinux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fool at example dot com
New email:
PHP Version: OS:

 

 [2013-02-19 17:00 UTC] fool at example dot com
Description:
------------
$ php -a
Interactive shell

php > $a = 'ab';
php > $b = 'cc'.&$a;
PHP Parse error:  syntax error, unexpected '&' in php shell code on line 1

Parse error: syntax error, unexpected '&' in php shell code on line 1

php > $b = &$a.'cc'; // no error
php > echo $b; // and 'cc' is ignored
abphp > 



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-19 17:14 UTC] fool at example dot com
Assign By Reference
 [2013-02-19 17:14 UTC] fool at example dot com
-: femrat at gmail dot com +: fool at example dot com -Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC