ReflectionFunction_getClosureThis.phpt 360 B

1234567891011121314151617
  1. --TEST--
  2. Reflection::getClosureThis()
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('reflection') || !defined('PHP_VERSION_ID') || PHP_VERSION_ID < 50300) {
  6. print 'skip';
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. $closure = function($param) { return "this is a closure"; };
  12. $rf = new ReflectionFunction($closure);
  13. var_dump($rf->getClosureThis());
  14. echo "Done!\n";
  15. --EXPECTF--
  16. NULL
  17. Done!