match_breakpoints_001.phpt 541 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Test match default breakpoint with variable assignment
  3. --INI--
  4. opcache.enable_cli=0
  5. --PHPDBG--
  6. b 5
  7. b 10
  8. r
  9. q
  10. --EXPECTF--
  11. [Successful compilation of %s.php]
  12. prompt> [Breakpoint #0 added at %s.php:5]
  13. prompt> [Breakpoint #1 added at %s.php:10]
  14. prompt> [Breakpoint #1 at %s.php:10, hits: 1]
  15. >00010: default => 'bar', // breakpoint #1
  16. 00011: };
  17. 00012:
  18. prompt>
  19. --FILE--
  20. <?php
  21. $foo = match (0) {
  22. 0 => 'foo',
  23. default => 'bar', // breakpoint #0
  24. };
  25. $foo = match (1) {
  26. 0 => 'foo',
  27. default => 'bar', // breakpoint #1
  28. };