-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #81200 ReflectionMethod::isStatic belongs on ReflectionFuncti…
…onAbstract
- Loading branch information
Showing
5 changed files
with
47 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Test closure isStatic | ||
--FILE-- | ||
<?php | ||
class Foo { | ||
public static function bar(){} | ||
public function baz() {} | ||
|
||
public function qux() { | ||
return static function(){}; | ||
} | ||
} | ||
|
||
$foo = new Foo; | ||
|
||
var_dump( | ||
(new ReflectionFunction(function(){}))->isStatic(), | ||
(new ReflectionFunction(static function(){}))->isStatic(), | ||
(new ReflectionFunction($foo->qux()))->isStatic(), | ||
(new ReflectionMethod($foo, 'bar'))->isStatic(), | ||
(new ReflectionMethod($foo, 'baz'))->isStatic(),); | ||
?> | ||
--EXPECT-- | ||
bool(false) | ||
bool(true) | ||
bool(true) | ||
bool(true) | ||
bool(false) |