php-src/Zend/tests/dynamic_call_001.phpt

23 lines
470 B
Plaintext
Raw Normal View History

2008-05-11 03:15:13 +00:00
--TEST--
Testing dynamic call to constructor (old-style)
--FILE--
<?php
class foo {
public function foo() {
}
}
$a = 'foo';
$a::$a();
?>
--EXPECTF--
2015-03-31 14:10:06 +00:00
Deprecated: 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
Fatal error: Uncaught EngineException: Non-static method foo::foo() cannot be called statically in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d