Guest User

Untitled

a guest
Feb 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. Is it possible to achieve both of following with the same object?
  2.  
  3. //Calling a static function if instance isn't created
  4. MyObj::MethodOne('String');
  5.  
  6.  
  7. //If we create instance first, we should be able to call the same method on that instace
  8. $myInstance = new MyObj('String');
  9. $myInstance->MethodOne();
Add Comment
Please, Sign In to add comment