Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class AdamsUtils {
- public static $the_answer = 42;
- public static function addTowel($string) {
- return $string . " and a towel.";
- }
- }
- $items = "I brought apples";
- echo AdamsUtils::$the_answer; // use Scope Resolution Operator (::) to access static members
- echo "\n";
- echo AdamsUtils::addTowel($items);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement