M maznos New Member Sep 15, 2012 #1 Is there a way to instantiate a class and call one of its methods in one line? I hoped the following would work but it doesn't:\[code\](new User())->get_name();\[/code\]
Is there a way to instantiate a class and call one of its methods in one line? I hoped the following would work but it doesn't:\[code\](new User())->get_name();\[/code\]