bug40621.phpt 428 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #40621 (Crash when constructor called inappropriately (statically))
  3. --FILE--
  4. <?php
  5. class Foo {
  6. private function __construct() { }
  7. function get() {
  8. self::__construct();
  9. }
  10. }
  11. Foo::get();
  12. echo "Done\n";
  13. ?>
  14. --EXPECTF--
  15. Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
  16. Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d