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

  private function __destruct() {
  }
}

$obj = new test;
$obj = NULL;

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