<?php class Go { public function if (bool $cond): Go { return $this; } public function then(callable $func): Go { return $this; } } $go = (new Go)->if(5 > 3)->then(function () {echo 'YAY!';}); var_dump($go);
You have javascript disabled. You will not be able to edit any code.