by boyter · 14y ago · 0 comments
The thing I find most annoying is being unable to pop the first element off an array when its returned and that when you do things like array_map it dosn't work with a method inside the same or other classes,
EG
$this->method()[0];
array_map($this->doSomething, $array);
list($firstElement) = $this->method();
array_map(array($this, 'doSomething'), $array);
Yes, neither is intuitive. And the syntax sucks. And it's not as easy to read (except sometimes where a method returns a tuple; `list` is wonderful there!). But it's certainly possible...