PHP 8.5.0 Beta 1 available for testing

Voting

: four minus two?
(Example: nine)

The Note You're Voting On

Anonymous
11 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