diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-29 16:03:24 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-30 09:19:02 +0100 |
commit | 6c73b50cf6cf71be26700ce168d5e69350637d71 (patch) | |
tree | 63442d7344ac41468c4f22a193a2e1214993b1bd /tests/lang/passByReference_006.phpt | |
parent | 4eb5db2c68ecab4fd50a5e1950fdd6eb3703b899 (diff) | |
download | php-git-6c73b50cf6cf71be26700ce168d5e69350637d71.tar.gz |
Remove static calls to non-static methods
Diffstat (limited to 'tests/lang/passByReference_006.phpt')
-rw-r--r-- | tests/lang/passByReference_006.phpt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/lang/passByReference_006.phpt b/tests/lang/passByReference_006.phpt index 9f5d275333..0fc2e390ae 100644 --- a/tests/lang/passByReference_006.phpt +++ b/tests/lang/passByReference_006.phpt @@ -30,6 +30,14 @@ class C { $ref5 = "Ref5 changed"; } + static function static_refs(&$ref1, &$ref2, &$ref3, &$ref4, &$ref5) { + $ref1 = "Ref1 changed"; + $ref2 = "Ref2 changed"; + $ref3 = "Ref3 changed"; + $ref4 = "Ref4 changed"; + $ref5 = "Ref5 changed"; + } + } echo "\n ---- Pass uninitialised array & object by ref: function call ---\n"; @@ -39,7 +47,7 @@ var_dump($u1, $u2, $u3, $u4, $u5); echo "\n ---- Pass uninitialised arrays & objects by ref: static method call ---\n"; unset($u1, $u2, $u3, $u4, $u5); -C::refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); +C::static_refs($u1[0], $u2[0][1], $u3->a, $u4->a->b, $u5->a->b->c); var_dump($u1, $u2, $u3, $u4, $u5); echo "\n\n---- Pass uninitialised arrays & objects by ref: constructor ---\n"; @@ -89,8 +97,6 @@ object(stdClass)#%d (1) { } ---- Pass uninitialised arrays & objects by ref: static method call --- - -Deprecated: Non-static method C::refs() should not be called statically in %s on line 39 array(1) { [0]=> string(12) "Ref1 changed" |