What is singleton pattern in php?



What is singleton pattern in php?..

Answer / Arpit Mishra

The Singleton pattern ensures a class has only one instance and provides a global point of access to it. In PHP, you can create a Singleton using the Hungry or Lazy initialization techniques.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Which is better get or post method?

1 Answers  


how can we check mail function with '127.0.0.1' (before submitting a site?

1 Answers  


What is needed to be able to use image function?

1 Answers  


what is the difference between GET,POST and REQUEST in php

1 Answers  


full form of php??

12 Answers   HCL,


When to use self over $this?

1 Answers  


What is the method to register a variable into a session?

1 Answers  


What is php resource type?

1 Answers  


Explain the difference between session and cookies in php?

1 Answers  


What is meant by urlencode and urldocode?

2 Answers  


How will you calculate days between two dates in PHP?

1 Answers  


What does mvc stand for and what does each component do?

1 Answers  


Categories