There is a way in PHP 4 (not available in version 3) to make use of a class's method without having to create an instance of the class. This can be useful if there is a function you would like to use, but you do not need the whole class that the function is in. The syntax for doing this (assuming a class called ClassName contains a method named Method) is:
As an example of this, you'll use the DetermineLinks() function to create a site map page, without creating an instance of HtmlNavTemplate—the class that defines the DetermineLinks() method.
Create a new PHP document in your text editor (Script 2.12).
Script 2.12. The sitemap.php script makes ...