summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug47857.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/general_functions/bug47857.phpt')
-rw-r--r--ext/standard/tests/general_functions/bug47857.phpt32
1 files changed, 17 insertions, 15 deletions
diff --git a/ext/standard/tests/general_functions/bug47857.phpt b/ext/standard/tests/general_functions/bug47857.phpt
index d19eca7248..0d2b35b09f 100644
--- a/ext/standard/tests/general_functions/bug47857.phpt
+++ b/ext/standard/tests/general_functions/bug47857.phpt
@@ -3,23 +3,25 @@ Bug #47851 (is_callable throws fatal error)
--FILE--
<?php
class foo {
- function bar() {
- echo "ok\n";
- }
+ function bar() {
+ echo "ok\n";
+ }
}
var_dump(is_callable(array('foo','bar')));
-foo::bar();
+try {
+ foo::bar();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
var_dump(is_callable(array('Exception','getMessage')));
-Exception::getMessage();
+try {
+ Exception::getMessage();
+} catch (Error $e) {
+ echo $e->getMessage(), "\n";
+}
?>
---EXPECTF--
-bool(true)
-
-Deprecated: Non-static method foo::bar() should not be called statically in %sbug47857.php on line %d
-ok
+--EXPECT--
+bool(false)
+Non-static method foo::bar() cannot be called statically
bool(false)
-
-Fatal error: Uncaught Error: Non-static method Exception::getMessage() cannot be called statically in %sbug47857.php:%d
-Stack trace:
-#0 {main}
- thrown in %sbug47857.php on line %d
+Non-static method Exception::getMessage() cannot be called statically