Voting

: max(six, nine)?
(Example: nine)

The Note You're Voting On

Safak Ozpinar
10 years ago
As of PHP 5.5 you can also use "static::class" to get the name of the called class.

<?php
class Bar {
public static function
test() {
var_dump(static::class);
}
}

class
Foo extends Bar {

}

Foo::test();
Bar::test();
?>

Output:

string(3) "Foo"
string(3) "Bar"

<< Back to user notes page

To Top