bug70528.phpt 628 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #70528 (assert() with instanceof adds apostrophes around class name)
  3. --INI--
  4. zend.assertions=1
  5. assert.exception=0
  6. assert.warning=1
  7. --FILE--
  8. <?php
  9. namespace Foo;
  10. class Bar {}
  11. $bar = "Bar";
  12. assert(new \stdClass instanceof $bar);
  13. assert(new \stdClass instanceof Bar);
  14. assert(new \stdClass instanceof \Foo\Bar);
  15. ?>
  16. --EXPECTF--
  17. Warning: assert(): assert(new \stdClass() instanceof $bar) failed in %sbug70528.php on line %d
  18. Warning: assert(): assert(new \stdClass() instanceof Bar) failed in %sbug70528.php on line %d
  19. Warning: assert(): assert(new \stdClass() instanceof \Foo\Bar) failed in %sbug70528.php on line %d