match_breakpoints_002.phpt 575 B

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