• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

`XenForo_Model::create("{$class}")` and `new {$class}`


Well-known member
What are the full benefits and drawbacks of each one? I know that XenForo_Model::create allows classes to be extended using the XFCP system, and I know that `new {$class}` is less code. I also know that the first choice allows me to immediately call non-static methods while the second option does not. Can someone add to this list of pros/cons so I can better know when to use one and not the other?