Organize your global functions to static methods - alternative to structural/procedural programming

If you are not into Object Oriented Programming, and include files and functions everywhere, you can get lost in your own function names. The good alternative is to group your functions into classes with static methods:class UserModule { public static function getUserId() { ... } public static function removeUser( $id ) { ... } } UserModule::removeUser( 11 );

Comments

Popular posts from this blog

How to show only month and year fields in android Date-picker?

How to construct a B+ tree with example

Homebrew uninstall