<?php class A { function __toString() { return "A"; } } $a = new a; $b = [$a => $a]; //Illegal offset type print_r($b);
You have javascript disabled. You will not be able to edit any code.