Bug #1143: Name mismatch functions<->variables in classes

From: Date: Thu, 11 Feb 1999 15:55:56 +0000
Subject: Bug #1143: Name mismatch functions<->variables in classes
Groups: php.dev 
Request: Send a blank email to php-dev+get-4053@lists.php.net to get a copy of this message
From: aulbach@unter.franken.de Operating system: linux PHP version: 3.0.5 PHP Bug Type: Parser error Bug description: Name mismatch functions&lt;-&gt;variables in classes I don´t know, if this bug was reported before, I didn´t see it in the 3.0.6 ChangeLog. This is the example script. <? class test { var $htmlhead = ARRAY( 'title' => '<TITLE>%s</TITLE>\n', 'stylesheet' => '' ); function htmlhead() { echo $this->htmlhead['title']; } } $newtest = new test; echo $newtest->htmlhead(); echo "<BR>"; ?> The result is: Warning: Variable $htmlhead is not an array or string in /www/wer-ist-wer.com/pages/aPage/test.html on line 10 If I change e.g. $htmlhead to $htmlhd it works. -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4053) next »