PHP 4.0 Bug #5437: Multi-line object dereference causes newline to be output

From: Date: Fri, 07 Jul 2000 14:19:18 +0000
Subject: PHP 4.0 Bug #5437: Multi-line object dereference causes newline to be output
Groups: php.dev 
Request: Send a blank email to php-dev+get-23714@lists.php.net to get a copy of this message
From: dragonzap1@aol.com Operating system: Linux, 2.2.16 kernel PHP version: 4.0.1pl2 PHP Bug Type: Scripting Engine problem Bug description: Multi-line object dereference causes newline to be output Config options: ./configure \ --with-mysql=/usr/local/mysql \ --with-apache=/usr/local/src/apache \ --with-gd=/usr/local/src/gd \ --with-jpeg-dir=/usr/local/src/jpeg \ --with-xml \ --with-mhash=/usr/local/src/mhash \ --enable-versioning Sample script: <?php class Bug { function test() { $x = 5; } } $nl = new Bug(); $nl-> test(); Header('Content-type: text/plain'); echo 'Hello.'; ?> Header() complains that output started on line 11, which is the "$nl->" line. On references to variables (instead of method calls) this would sometimes cause the parser to output an error. Note, however, that: $nl->[space] test(); and: $nl ->test(); ...do not have this problem.

« previous php.dev (#23714) next »