bug81101.phpt 606 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #81101 - Invalid single character repetition issues in JIT
  3. --FILE--
  4. <?php
  5. $matches = [];
  6. $test = ' App\Domain\Repository\MetaData\SomethingRepositoryInterface';
  7. preg_match('/\\\\([^\\\\]+)\s*$/', $test, $matches);
  8. var_dump($matches);
  9. $test2 = ' App\Domain\Exception\NotFoundException';
  10. preg_match('/\\\\([^\\\\]+)\s*$/', $test2, $matches);
  11. var_dump($matches);
  12. ?>
  13. --EXPECT--
  14. array(2) {
  15. [0]=>
  16. string(29) "\SomethingRepositoryInterface"
  17. [1]=>
  18. string(28) "SomethingRepositoryInterface"
  19. }
  20. array(2) {
  21. [0]=>
  22. string(18) "\NotFoundException"
  23. [1]=>
  24. string(17) "NotFoundException"
  25. }