PHP Classes

Instantiate a class and then call a method:

$my_class = new my_class();
$my_value = $my_class->get_value();

Instantiate a class and call a method in one line (PHP 5.4+):

$my_value = (new my_class)->get_value();