Do you know design patterns. List few?
Answer / Pradeep Parashar
Yes, here are some common design patterns:
1. Singleton: Ensures a class has only one instance and provides a global point of access to it.
2. Factory: Defines an interface for creating objects without specifying their concrete classes.
3. Observer: Defines a one-to-many dependency between objects, so that when one object changes state, all its dependents are notified and updated automatically.
4. Strategy: Defines a family of algorithms and encapsulates each one as an individual object, making it easy to switch between them at runtime.
5. Decorator: Attaches additional responsibilities to an existing object dynamically without modifying its structure.
| Is This Answer Correct ? | 0 Yes | 0 No |
Tell me what are the __construct() and __destruct() methods in a php class?
How send email using php?
Can we use php variable in javascript?
What is the scope of career in PHP/Mysql
Tell me how to get the value of current session id?
How many types of inheritances used in php and how we achieve it.
How can we get the browser properties using PHP?
4 Answers Google, Pollux Softech,
How to convert the first character to upper case?
How to print \ in php. Only \ with out using . or *.
What is the mysql injection?
What are computer variables?
Explain php explode() function.