|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29308 Using the $this->* syntax in a method's argument list produces a parse error.
Submitted: 2004-07-21 18:19 UTC Modified: 2004-07-21 20:29 UTC
From: louis at mulliemedia dot com Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.0.0 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: louis at mulliemedia dot com
New email:
PHP Version: OS:


 [2004-07-21 18:19 UTC] louis at mulliemedia dot com
Using the $this->* syntax in a method's argument list produces a parse error at runtime.

PHP Version 5.0.0RC3

Reproduce code:

class Test
    var $LastResultSet='this Should print';
    function Test($Arg = $this->LastResultSet)
       print $Arg;

$ob = &new Test;

Expected result:
this Should print

Actual result:
Error in C:\Development\0.0.2\\test.php on line 6: parse error, unexpected T_VARIABLE


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-21 20:29 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

You can only use constants as default values.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 03:01:28 2024 UTC