summaryrefslogtreecommitdiff
path: root/Zend/tests/bug40621.phpt
blob: 40259580602edc2bd442c8e5c04b9b3b8f6afb17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #40621 (Crash when constructor called inappropriately (statically))
--FILE--
<?php

class Foo {
    private function __construct() { }
    function get() {
        self::__construct();
    }
}

Foo::get();

echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Non-static method Foo::get() cannot be called statically in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d