php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38964 Duality in treating variables.
Submitted: 2006-09-26 15:20 UTC Modified: 2006-09-26 15:21 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: faust04 at o2 dot pl Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.1.6 OS: OpenSuSE10.1
Private report: No CVE-ID: None
 [2006-09-26 15:20 UTC] faust04 at o2 dot pl
Description:
------------
Duality in treating variables.

Reproduce code:
---------------
$o_$o = 10; // generates an error - that's ok
echo "My variable value: $o_$o"; // treat's "$o_$o" as a right declared variable (sic!). It looks like 2 different variable definitions and that's the mistake

Expected result:
----------------
Error 2 times

Actual result:
--------------
Error
My variable value: 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-26 15:21 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Inside a string it acts as concatenation. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 04:01:32 2024 UTC