ReflectionFunction_isClosure_basic.phpt 399 B

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