|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-02 08:44 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 06 00:00:02 2026 UTC |
Description: ------------ //undefined $this in member function default parameter value class Test { public function fnTest($that= $this) { echo __CLASS__, "::", __FUNCTION__, "\t that: ", gettype($that), "\n"; } } Reproduce code: --------------- class Test { public function fnTest($that= $this) { echo __CLASS__, "::", __FUNCTION__, "\t that: ", gettype($that), "\n"; } } Expected result: ---------------- Test::fnTest that: Object Actual result: -------------- [Thu Mar 02 10:19:34 2006] [error] PHP Parse error: syntax error, unexpected T_VARIABLE in D:\\dev\\Site\\multipleinheritance.htm on line 3