bug61780.phpt 302 B

123456789101112131415161718
  1. --TEST--
  2. Bug #61780 (Inconsistent PCRE captures in match results): basics
  3. --FILE--
  4. <?php
  5. preg_match('/(a)?([a-z]*)(\d*)/', '123', $matches, PREG_UNMATCHED_AS_NULL);
  6. var_dump($matches);
  7. ?>
  8. --EXPECT--
  9. array(4) {
  10. [0]=>
  11. string(3) "123"
  12. [1]=>
  13. NULL
  14. [2]=>
  15. string(0) ""
  16. [3]=>
  17. string(3) "123"
  18. }