1--TEST-- 2ZE2 factory and singleton, test 5 3--FILE-- 4<?php 5class test { 6 7 protected function __destruct() { 8 } 9} 10 11$obj = new test; 12$obj = NULL; 13 14echo "Done\n"; 15?> 16--EXPECTF-- 17Fatal error: Uncaught Error: Call to protected test::__destruct() from global scope in %s:%d 18Stack trace: 19#0 {main} 20 thrown in %sfactory_and_singleton_005.php on line %d 21