summaryrefslogtreecommitdiff
path: root/tests/classes/factory_and_singleton_007.phpt
blob: 2c35090eed5e0a78c4a452dcd13538faca40d1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
ZE2 factory and singleton, test 7
--FILE--
<?php
class test {

  protected function __clone() {
  }
}

$obj = new test;
$clone = clone $obj;
$obj = NULL;

echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Call to protected test::__clone() from global scope in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d