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