L
L
lexstile2018-06-30 16:32:39
PHP
lexstile, 2018-06-30 16:32:39

How to write calls to 2 or more class methods in one line?

For example, there is a code:

$arMatches = $BET->filterTime($arResult,FIRST_MIN_60,LAST_MIN_60);
$arMatchesID = $BET->getID($arMatches);

Can this problem be solved with a shorter notation? How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-06-30
@lexstile

No way. You are creating 2 separate variables, so two actions are needed.
In fact, of course, you can write it down in one line, but it will be a wild unreadable perversion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question