1--TEST-- 2Test closure isStatic 3--FILE-- 4<?php 5class Foo { 6 public static function bar(){} 7 public function baz() {} 8 9 public function qux() { 10 return static function(){}; 11 } 12} 13 14$foo = new Foo; 15 16var_dump( 17 (new ReflectionFunction(function(){}))->isStatic(), 18 (new ReflectionFunction(static function(){}))->isStatic(), 19 (new ReflectionFunction($foo->qux()))->isStatic(), 20 (new ReflectionMethod($foo, 'bar'))->isStatic(), 21 (new ReflectionMethod($foo, 'baz'))->isStatic(),); 22?> 23--EXPECT-- 24bool(false) 25bool(true) 26bool(true) 27bool(true) 28bool(false) 29