- array_fill_keys: documentation ( source)
<?php
class str {
private $str;
public function __construct($str){ $this->str = $str; }
public function __tostring() { $this->this_ref = $this; return $this->str; }
}
array_fill_keys([new str("123")], true);