blob: 52443734b769f19f40a55b6b353dbe7b4aa4e837 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--TEST--
Bug #71275 (Bad method called on cloning an object having a trait)
--FILE--
<?php
trait MyTrait {
public function _() {
throw new RuntimeException('Should not be called');
}
}
class MyClass {
use MyTrait;
public function __clone() {
echo "I'm working hard to clone";
}
}
$instance = new MyClass();
clone $instance;
?>
--EXPECT--
I'm working hard to clone
|