Last active
August 29, 2015 14:02
-
-
Save unr/fbaf90a6d7bfe7056cfe to your computer and use it in GitHub Desktop.
An example of static classes in php.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Declare our class, and its init function | |
class Example { | |
public static function init() { | |
echo "Hello World"; | |
} | |
} | |
// This will echo hello world, from the class | |
Example::init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment