summaryrefslogtreecommitdiff
path: root/tests/classes/factory_and_singleton_008.phpt
blob: 1a87833169b97665e3fe74c48bc6b8f1cf85cd14 (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 8
--FILE--
<?php
class test {

  private function __clone() {
  }
}

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

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