diff options
author | Felipe Pena <felipe@php.net> | 2010-03-02 00:16:40 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2010-03-02 00:16:40 +0000 |
commit | 9c53d6db8297dbce0629b7bac409276441cd5829 (patch) | |
tree | aacade5e97bc596f01806391f748471cabc7a91f /Zend/tests/bug51176.phpt | |
parent | 201a9dd72f1536268d2557e08517cdf8304a3d3d (diff) | |
download | php-git-9c53d6db8297dbce0629b7bac409276441cd5829.tar.gz |
- Fixed bug #51176 (Static calling in non-static method behaves like $this->)
Diffstat (limited to 'Zend/tests/bug51176.phpt')
-rw-r--r-- | Zend/tests/bug51176.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/tests/bug51176.phpt b/Zend/tests/bug51176.phpt new file mode 100644 index 0000000000..436378eff2 --- /dev/null +++ b/Zend/tests/bug51176.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #51176 (Static calling in non-static method behaves like $this->) +--FILE-- +<?php +class Foo +{ + public function start() + { + self::bar(); + static::bar(); + Foo::bar(); + } + + public function __call($n, $a) + { + echo "instance\n"; + } + + public static function __callStatic($n, $a) + { + echo "static\n"; + } +} + +$foo = new Foo(); +$foo->start(); + +?> +--EXPECT-- +static +static +static |