Voting

: one plus zero?
(Example: nine)

The Note You're Voting On

Anonymous
12 years ago
It should be noted that in 'Example #2', you can also call a variably defined static method as follows:
<?php
class Foo {
 public static function aStaticMethod() {
 // ...
 }
}
$classname = 'Foo';
$methodname = 'aStaticMethod';
$classname::{$methodname}(); // As of PHP 5.3.0 I believe
?>

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /