ID:               40263
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jbailey at raspberryginger dot com
 Status:           Bogus
 Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

http://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex


Previous Comments:
------------------------------------------------------------------------

[2007-01-28 16:00:40] [EMAIL PROTECTED]

echo $a->{$b->a}

------------------------------------------------------------------------

[2007-01-28 15:51:31] jbailey at raspberryginger dot com

Description:
------------
There is no way of doing $a->$b->a where I really want $a->($b->a)

Reproduce code:
---------------
class a {}
class b {}

$a = new a();
$b = new b();

$a->foo = "foo";
$a->bar = "bar";

$b->a = "foo";
$b->b = "bar";

$temp=$b->a;
echo $a->$temp;

echo $a->($b->a);


Expected result:
----------------
The lines:

echo $a->$temp;

echo $a->($b->a);

should each output the same thing.

Actual result:
--------------
Parse error: syntax error, unexpected '(', expecting T_STRING or
T_VARIABLE or '{' or '$' in /tmp/test.php on line 18



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40263&edit=1

Reply via email to