match_breakpoints_004.phpt 597 B

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