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/ReflectionClass_newInstanceArgs_001.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/ReflectionClass_newInstanceArgs_001.phpt')
| -rw-r--r-- | ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt b/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt index 068710311d..11bd44077f 100644 --- a/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt +++ b/ext/reflection/tests/ReflectionClass_newInstanceArgs_001.phpt @@ -5,11 +5,6 @@ Robin Fernandes <robinf@php.net> Steve Seear <stevseea@php.net> --FILE-- <?php -class A { - public function A() { - echo "In constructor of class A\n"; - } -} class B { public function __construct($a, $b) { @@ -32,28 +27,17 @@ class E { } -$rcA = new ReflectionClass('A'); $rcB = new ReflectionClass('B'); $rcC = new ReflectionClass('C'); $rcD = new ReflectionClass('D'); $rcE = new ReflectionClass('E'); try { - var_dump($rcA->newInstanceArgs()); -} catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; -} -try { - var_dump($rcA->newInstanceArgs(array('x'))); -} catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; -} - -try { var_dump($rcB->newInstanceArgs()); } catch (Throwable $e) { echo "Exception: " . $e->getMessage() . "\n"; } + try { var_dump($rcB->newInstanceArgs(array('x', 123))); } catch (Throwable $e) { @@ -85,13 +69,6 @@ try { } ?> --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 -In constructor of class A -object(A)#%d (0) { -} -In constructor of class A -object(A)#%d (0) { -} Exception: Too few arguments to function B::__construct(), 0 passed and exactly 2 expected In constructor of class B with args x, 123 object(B)#%d (0) { |
