Factory Function
When a function returns an object, we call it a factory function. It can produce object instance without new keywords or classes.
Ex:-
Factory Function with Parameter
Ex:-
Latest posts by rajeshkumar (see all)
- AWS Error: Access denied by EC2 Instance Connect - December 4, 2023
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023