Bug #2826: $a->b[$i]->c does not work

From: Date: Thu, 25 Nov 1999 06:05:02 +0000
Subject: Bug #2826: $a->b[$i]->c does not work
Groups: php.dev 
Request: Send a blank email to php-dev+get-13100@lists.php.net to get a copy of this message
From: svassili@midway.uchicago.edu Operating system: Windows NT Server 4.0 PHP version: 3.0.11 PHP Bug Type: Parser error Bug description: $a->b[$i]->c does not work The following script gives parser error on the last line: ___________________________________________________________ class Sample{ var $b; function Sample(){ $b[] = new Crash; } } class Crash{ var $c; } $a = new Sample; $a->b[0]->c=1999; ___________________________________________________________ As I understand there is only one way to modify the content of property $a->b[0]->c: $temp=$a->b[0]; $temp->c=1999; $a->b[0]=$temp; But it is too awkward.

« previous php.dev (#13100) next »