I was wonderiing how I would go about something like this
$class = 'classname';
return $class::staticMethod(); , not happy isnt working. Any ideas
lemme know.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Dan Rossi wrote:
I was wonderiing how I would go about something like this
$class = 'classname';
return $class::staticMethod(); , not happy isnt working. Any ideas
lemme know.
class MyClass {
function static_method() {
echo 'I'm in static_method !';
}
}
You can call the function stati
class MyClass {
function static_method() {
echo 'I'm in static_method !';
}
}
You can call the function statically using the double colon ( :: )
operator :
Ahem. Double colon does now works with dynamic names. If I'm not
mistaken, call_user_func(array('class', 'function')) is the only
I ment: Double colon does no_t_ works with dynamic names.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
4 matches
Mail list logo