Faqts : Computers : Programming : Languages : PHP : kms : Functions

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 3 people (0%) answered Yes
Recently 0 of 3 people (0%) answered Yes

Entry

Variable class function calls like $var = "C::F"; $var( "arg" ); fail - $var goes lower case. Why?

Jan 2nd, 2003 05:43
Jens Clasen, Yermo Lamers,


First of all $var does not go lower case, but the error message stating
that there is no function like that does! Function names are in contrast
to var-names NOT case-sensitive.
To solve Your current problem, You'll need to exclude the ::-operator
from string:
$class  = 'C';
$method = 'F';
$class::$method('arg');