Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21901 invoked by uid 1010); 22 Sep 2004 20:51:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21848 invoked from network); 22 Sep 2004 20:51:49 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 22 Sep 2004 20:51:49 -0000 Received: from BAUMBART (pD95F80F6.dip.t-dialin.net [::ffff:217.95.128.246]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Wed, 22 Sep 2004 20:51:49 +0000 Date: Wed, 22 Sep 2004 22:53:49 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1521061199.20040922225349@marcus-boerger.de> To: Sebastian Bergmann CC: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Weird engine problem From: helly@php.net (Marcus Boerger) Hello Sebastian, Wednesday, September 22, 2004, 9:52:18 PM, you wrote: > For quite a while I have been fighting with what I believe to be a bug in > the Zend Engine 2. > In PHPUnit2 I have the following code: > public function run(PHPUnit2_Framework_Test $test) { > // $test->name: string(14) "testGetBalance" > $this->startTest($test); > try { > // $test->name: string(14) "testGetBalance" > $test->runBare(); > } > catch (PHPUnit2_Framework_AssertionFailedError $e) { > // $test->name: string(14) "testgetbalance" > $this->addFailure($test, $e); > } > catch (Exception $e) { > // $test->name: string(14) "testgetbalance" > $this->addError($test, $e); > } > // $test->name: string(14) "testgetbalance" > $this->endTest($test); > } > The object referenced by the variable $test has a private attribute > called "name". The value of this attribute somehow get lowercased > when the object is used inside the catch-block. > My effort to come up with a small, reproducing script for this issue > has yet to bear fruit as the obvious approach > class Foo { > private $bar = 'BAR'; > } > class Bar { > public function doSomething(Foo $foo) { > var_dump($foo); > try { > var_dump($foo); > throw new Exception('...'); > } > catch (Exception $e) { > var_dump($foo); > } > var_dump($foo); > } > } > $f = new Foo; > $b = new Bar; > $b->doSomething($f); > ?> > does not show the problem. > Any idea what I might be missing here? Is there some way to debug the > engine to see where the lowercasing happens? > Thanks! > -- > Sebastian Bergmann http://www.sebastian-bergmann.de/ > GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 Disallow inlining and set a breakpoint on zend_str_tolower_copy() is most likely responsible for downcasing if the engine is the problem.... Best regards, Marcus mailto:helly@php.net