May 7, 2013, 8:37 AM
Post #3 of 4
You didn't provide the context (i.e. how this "new" is supposed to be used), neither you had posted the whole body of the function. Hence, we can only guess. From the code, I assume that this is a function intended to create a new object based on a existing one. For example, if $x is a reference to some object (likely inheriting from Room), $x->new might create a new object of the same type as $x.
Re: [death_metal] ref used in classes
[In reply to]
Of course, this is only speculation. You need to provide more information on your case.