blob: eeaf8d382c840c1a90bf013ba52c897411959a06 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 | --TEST--
Reflection::isClosure
--CREDITS--
Stefan Koopmanschap <stefan@phpgg.nl>
TestFest PHP|Tek
--SKIPIF--
<?php
if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
  print 'skip';
}
?>
--FILE-- 
<?php
$closure = function($param) { return "this is a closure"; };
$rc = new ReflectionFunction($closure);
echo var_dump($rc->isClosure());
--EXPECTF--
bool(true)
 |