Possible Duplicate:
static::staticFunctionName()
What does the keyword static
mean when it is placed just before a function call? In the place of a class name.
Like this:
static::createKernel();
Possible Duplicate:
static::staticFunctionName()
What does the keyword static
mean when it is placed just before a function call? In the place of a class name.
Like this:
static::createKernel();
It's a way of calling a Late Static Binding. I can't do a better job describing it than the PHP manual itself.
It has almost the same meaning as self
but instead in references the actual class, instead of the class from which the code is found. Example from php.net:
<?php
class A {
const C = 'constA';
public function m() {
echo static::C;
}
}
class B extends A {
const C = 'constB';
}
$b = new B();
$b->m();
// output: constB
?>