bug50146.phpt 417 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #50146 (property_exists: Closure object cannot have properties)
  3. --FILE--
  4. <?php
  5. $obj = function(){};
  6. var_dump(property_exists($obj,'foo'));
  7. $ref = new ReflectionObject($obj);
  8. var_dump($ref->hasProperty('b'));
  9. var_dump(isset($obj->a));
  10. ?>
  11. --EXPECTF--
  12. bool(false)
  13. bool(false)
  14. Fatal error: Uncaught Error: Closure object cannot have properties in %s:%d
  15. Stack trace:
  16. #0 {main}
  17. thrown in %s on line %d