Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2097 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57066 invoked from network); 30 May 2003 19:17:56 -0000 Received: from unknown (HELO united.lan.codewhore.org) (24.95.48.170) by pb1.pair.com with SMTP; 30 May 2003 19:17:56 -0000 Received: from dave by united.lan.codewhore.org with local (Exim 3.16 #1) id 19LpA9-0008GI-00 for internals@lists.php.net; Fri, 30 May 2003 15:03:37 -0400 Date: Fri, 30 May 2003 15:03:36 -0400 To: PHP Developers List Message-ID: <20030530190336.GA31337@codewhore.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: David Brown Subject: ZE2 and assert() From: dave@codewhore.org (David Brown) Hi: Given the following script, which uses assert to eval() a string that references the current class: foo == 1'); } function as_expr() { assert($this->foo == 1); } } $foo = new foo(); $foo->as_expr(); $foo->as_string(); ?> PHP 4.3-cvs executes it correctly, but PHP 5.0-cvs with ZE2 fails: Fatal error: Using $this when not in object context in /home/dave/test.php(8) : assert code on line 1 Is this expected behavior? More specifically, is $this no longer available inside of an eval() on ZE2? Thanks in advance, - Dave dave@codewhore.org