Answer the question
In order to leave comments, you need to log in
What is this design?
I mean the design itself, the components are clear.$this->params = $url ? array_values($url) : [];
Answer the question
In order to leave comments, you need to log in
This is the same as:
if($url) {
$this->params = array_values($url);
} else {
$this->params = [];
}
Alternative if else syntax
If $this->params = $url - return array_values($url), otherwise - empty array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question