From:             [EMAIL PROTECTED]
Operating system: Windows
PHP version:      4.0.6
PHP Bug Type:     Class/Object related
Bug description:  PHP global function and class method names conflict

It seems that class methods are not really part of the class. The scope
of
a method definition is global not local to the class. I have tried the
following: 

class CMyClass 
{ 
function Print () 
{ 
} 
} 

It doesn't work because the PHP parser thinks that the "Print"
method is the "print" PHP global function. I have tried to force
scope: 

class CMyClass 
{ 
function CMyClass::Print () 
{ 
} 
} 

But it doesn't work. The only solution I found is to use an other name
for
my method, even if it really prints something.

-- 
Edit bug report at: http://bugs.php.net/?id=14178&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to