LonghornPHP 2026

Voting

: max(three, six)?
(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

To Top