mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
21 lines
428 B
PHP
21 lines
428 B
PHP
--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
|