1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// test: PHP 8.5 pipe operator resolves type through chain // feature: completion // Adapted from phpactor pipe-operator/pipe-operator.test // expect: getTimestamp( --- <?php class DateTime { public function getTimestamp(): int {} } function createDate(string $input): DateTime { return new DateTime(); } $title = 'hello'; $result = $title |> trim(...) |> createDate(...); $result-><>