Explain about getters and setters in php?
Answer / Shrikant Saroj
Getters and Setters are methods used in PHP to encapsulate data. A getter is a method that retrieves the value of a private property, while a setter is a method that sets the value of a private property. This helps protect the data from being modified directly.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is php is dying?
Tell us how to redirect a page in php?
What is $_ get and $_ post in php?
Does php pass arrays by reference?
How to get the number of characters in a string?
Is php an oop?
Explain me what are the main error types in php and how do they differ?
What are differences between PECL and PEAR?
How do sessions work in php?
how we can upload and view video files
What does the unlink() function means?
Tell me what the difference between the 'bitwise and' operator and the 'logical and' operator?