On Fri, Feb 21, 2003 at 10:47:16AM -0600, Brian Moon wrote:
> |   class foo {}
> |   class bar {
> |       var $baz = 'foo';
> |   }
> |   $bar = new bar();
> |   $foo = new $bar->baz; // let's call this line 6
> |
> | It runs fine on ZE1, but ZE2 bails out with "parse error, unexpected
> | T_OBJECT_OPERATOR on line 6".
> 
> Should this work?  YOu are using new with a returned value that is not an
> object.

Yes. The following example works with both ZE1 and 2, so there's no
reason that the code above shouldn't.

  class foo {}
  $bar = 'foo';
  $foo = new $bar;

Sander

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to