summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2004-02-11 10:48:20 +0000
committerZeev Suraski <zeev@php.net>2004-02-11 10:48:20 +0000
commit0f3106ad17d103145df9a460cdd2c255e7b6f1f7 (patch)
treeac1c7f11f01bdc89ce9d124ad6768136cf13c3c4
parent73a6bcf5cf4404b7fb5f84eda35b436b449f9d03 (diff)
downloadphp-git-0f3106ad17d103145df9a460cdd2c255e7b6f1f7.tar.gz
Fix and clarify the test case
-rwxr-xr-xZend/tests/bug26802.phpt34
1 files changed, 11 insertions, 23 deletions
diff --git a/Zend/tests/bug26802.phpt b/Zend/tests/bug26802.phpt
index 794dbd73b4..ab0ad25aa5 100755
--- a/Zend/tests/bug26802.phpt
+++ b/Zend/tests/bug26802.phpt
@@ -3,47 +3,35 @@ Bug #26802 (Can't call static method using a variable)
--FILE--
<?php
-function func() {
- echo __METHOD__ . "\n";
-}
-
-function work() {
+function global_func()
+{
echo __METHOD__ . "\n";
}
-$function = 'func';
+$function = 'global_func';
$function();
class foo
{
- static $method = 'func';
-
- static public function bar() {
- echo __METHOD__ . "\n";
- }
+ static $method = 'global_func';
- static public function func() {
+ static public function foo_func()
+ {
echo __METHOD__ . "\n";
}
}
-foo::bar();
-
-$static_method = "foo::bar";
-
-$static_method();
-
/* The following is a BC break with PHP 4 where it would
* call foo::fail. In PHP 5 we first evaluate static class
* properties and then do the function call.
*/
-$method = 'fail';
+$method = 'foo_func';
foo::$method();
+
+
?>
===DONE===
--EXPECT--
-func
-foo::bar
-foo::bar
-func
+global_func
+foo::foo_func
===DONE===