<?php
class Foo {
protected $box;
public function setBox(array $box)
{
// Segfault
list($lat1, $lon1, $lat2, $lon2) = $this->box = $box;
// Works perfectly fine
$this->box = $box;
list($lat1, $lon1, $lat2, $lon2) = $this->box;
return $this;
}
}
$foo = new Foo;
$foo->setBox(explode(',', '40.688235,-74.013718,40.756427,-73.958770'));
echo "Success";
preferences:
40.91 ms | 402 KiB | 5 Q