I want to get an object of a class, but class is instantiated only like this.

new classname();

  • 2
    And the problem is? $foo = new classname(); - tada, $foo now is an object of that class. If you elaborate why you need that object, what you want to do with it, I might be able to give a proper answer – kero Jul 25 '17 at 13:26
  • I could not do change in code of that already instantiated class. – umesh.nevase Aug 1 '17 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.