1--TEST-- 2Testing usage of object as array on clone statement 3--FILE-- 4<?php 5 6error_reporting(E_ALL|E_STRICT); 7 8class foo { 9 public function __get($a) { 10 return new $this; 11 } 12} 13 14$c = new foo; 15 16$a = clone $c->b[1]; 17 18?> 19--EXPECTF-- 20Fatal error: Cannot use object of type foo as array in %s on line %d 21