How to get class instance without a constructor in PHP

1 · Amit Merchant · Sept. 13, 2021, 4:01 p.m.
Have you ever stumbled upon a situation in which you need an instance of a class to create its object but with one condition and that is there is no constructor declared for that class? The problem The solution The problem I did encounter this while working on one of my PHP packages called array-utils. So, the package is just a simple library which is a wrapper implementation of common PHP array methods. I created this package because I wanted uniformity across these different array methods. B...