1--TEST-- 2Testing collision with magic methods 3--FILE-- 4<?php 5 6trait foo { 7 public function __clone() { 8 var_dump(__FUNCTION__); 9 } 10} 11 12trait baz { 13 public function __clone() { 14 var_dump(__FUNCTION__); 15 } 16} 17 18class bar { 19 use foo; 20 use baz; 21} 22 23$o = new bar; 24var_dump(clone $o); 25 26?> 27--EXPECTF-- 28Fatal error: Trait method __clone has not been applied, because there are collisions with other trait methods on bar in %s on line %d 29