blob: 564ba55be213be5759cd9a8b5a3561e485b858c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--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--
Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d
|