summaryrefslogtreecommitdiff
path: root/Zend/tests/incompat_ctx_user.phpt
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-01-29 16:03:24 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-01-30 09:19:02 +0100
commit6c73b50cf6cf71be26700ce168d5e69350637d71 (patch)
tree63442d7344ac41468c4f22a193a2e1214993b1bd /Zend/tests/incompat_ctx_user.phpt
parent4eb5db2c68ecab4fd50a5e1950fdd6eb3703b899 (diff)
downloadphp-git-6c73b50cf6cf71be26700ce168d5e69350637d71.tar.gz
Remove static calls to non-static methods
Diffstat (limited to 'Zend/tests/incompat_ctx_user.phpt')
-rw-r--r--Zend/tests/incompat_ctx_user.phpt11
1 files changed, 5 insertions, 6 deletions
diff --git a/Zend/tests/incompat_ctx_user.phpt b/Zend/tests/incompat_ctx_user.phpt
index 25c95ba219..8c7461e4f7 100644
--- a/Zend/tests/incompat_ctx_user.phpt
+++ b/Zend/tests/incompat_ctx_user.phpt
@@ -4,18 +4,17 @@ Incompatible context call (non-internal function)
<?php
class A {
- function foo() { var_dump(get_class($this)); }
+ function foo() { var_dump(get_class($this)); }
}
class B {
- function bar() { A::foo(); }
+ function bar() { A::foo(); }
}
$b = new B;
try {
- $b->bar();
+ $b->bar();
} catch (Throwable $e) {
- echo "Exception: " . $e->getMessage() . "\n";
+ echo "Exception: " . $e->getMessage() . "\n";
}
?>
--EXPECTF--
-Deprecated: Non-static method A::foo() should not be called statically in %s on line %d
-Exception: Using $this when not in object context
+Exception: Non-static method A::foo() cannot be called statically