#29308 [Opn->Bgs]: Using the $this->* syntax in a method's argument list produces a parse error.

From: Date: Wed, 21 Jul 2004 18:29:19 +0000
Subject: #29308 [Opn->Bgs]: Using the $this->* syntax in a method's argument list produces a parse error.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-63278@lists.php.net to get a copy of this message
ID: 29308 Updated by: helly@php.net Reported By: louis at mulliemedia dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows XP PHP Version: 5.0.0 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You can only use constants as default values. Previous Comments: ------------------------------------------------------------------------ [2004-07-21 18:19:00] louis at mulliemedia dot com Description: ------------ Using the $this->* syntax in a method's argument list produces a parse error at runtime. PHP Version 5.0.0RC3 Reproduce code: --------------- <?php class Test { var $LastResultSet='this Should print'; function Test($Arg = $this->LastResultSet) { print $Arg; } } $ob = &new Test; $ob->Test(); ?> Expected result: ---------------- this Should print Actual result: -------------- Error in C:\Development\0.0.2\0.0.2.0\test.php on line 6: parse error, unexpected T_VARIABLE ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29308&edit=1

« previous php.bugs (#63278) next »