xref: /PHP-7.2/Zend/tests/dynamic_call_001.phpt (revision 17ccbeec)
1--TEST--
2Testing dynamic call to constructor (old-style)
3--FILE--
4<?php
5
6class foo {
7	public function foo() {
8	}
9}
10
11$a = 'foo';
12
13$a::$a();
14
15?>
16--EXPECTF--
17Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in %s on line %d
18
19Fatal error: Uncaught Error: Non-static method foo::foo() cannot be called statically in %s:%d
20Stack trace:
21#0 {main}
22  thrown in %s on line %d
23