diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-29 12:14:54 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-29 13:04:20 +0100 |
| commit | 682b54f68748715f85e9ac4a267477d9ac61918a (patch) | |
| tree | ce6512a63b300d6b0bf1059078992cad81120cf9 /ext/reflection/tests/004.phpt | |
| parent | 4d8dc2b05e7126bfcd5b639ca632906f96d5ff65 (diff) | |
| download | php-git-682b54f68748715f85e9ac4a267477d9ac61918a.tar.gz | |
Remove support for legacy constructors
This has been deprecated in PHP 7.0 by
https://wiki.php.net/rfc/remove_php4_constructors.
Diffstat (limited to 'ext/reflection/tests/004.phpt')
| -rw-r--r-- | ext/reflection/tests/004.phpt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/reflection/tests/004.phpt b/ext/reflection/tests/004.phpt index 36ae406b43..924c3fe283 100644 --- a/ext/reflection/tests/004.phpt +++ b/ext/reflection/tests/004.phpt @@ -4,7 +4,7 @@ ReflectionMethod::invoke() with non object or null value <?php class a { - function a(){ + function __construct(){ } } class b { @@ -13,7 +13,7 @@ class b { $b = new b(); $a=new ReflectionClass("a"); -$m=$a->getMethod("a"); +$m=$a->getMethod("__construct"); try { $m->invoke(null); @@ -35,9 +35,7 @@ try { echo $E->getMessage()."\n"; } -echo "===DONE===\n";?> ---EXPECTF-- -Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; a has a deprecated constructor in %s on line %d -Trying to invoke non static method a::a() without an object +?> +--EXPECT-- +Trying to invoke non static method a::__construct() without an object Given object is not an instance of the class this method was declared in -===DONE=== |
