Okay, so I can't do this?

PHP Code:
<?php
    
class { public function A() {} public function B() {} }

    new 
A()->B();
?>
How can I do this in one line?

Also, what the difference between using __construct, and a function which has the same name as the class?