17
2011
PHP Destructor
I have been coding with PHP for a while. The destructor feature is something that I rarely use. It is probably due to the nature of PHP. During the execution of a PHP script, a process is create to execute the script. The process is terminated at end of the execution and the resources used by the script are released. That is the reason why I think not many developers implement destructors in their PHP [...]
13
2011
Singleton
Singleton is almost one of the most commonly used design patterns used in software engineering. The pattern restricts the instantiation of a class to a single object. Singleton pattern: allows lazy loading makes sure that one instance exists provides a central point to gain access to that single object instance allows returning interface to clients without changes on the client side Although Singleton pattern is often used with Factory pattern, my example is not using [...]

An article by admin