factory_and_singleton_003.phpt 312 B

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