defaultValue.php 806 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. namespace NS;
  4. define('DEFINED', 123);
  5. define('NS_DEFINED', 'xxx');
  6. const NS_DEFINED = 456;
  7. interface Bar
  8. {
  9. const DEFINED = 'xyz';
  10. }
  11. class ParentFoo
  12. {
  13. public const PUBLIC_DEFINED = 'xyz';
  14. }
  15. class Foo extends ParentFoo
  16. {
  17. public const PUBLIC_DEFINED = 'abc';
  18. protected const PROTECTED_DEFINED = 'abc';
  19. private const PRIVATE_DEFINED = 'abc';
  20. public function method(
  21. $a,
  22. $b = self::PUBLIC_DEFINED,
  23. $c = Foo::PUBLIC_DEFINED,
  24. $d = SELF::PUBLIC_DEFINED,
  25. $e = Foo::PROTECTED_DEFINED,
  26. $f = self::PROTECTED_DEFINED,
  27. $g = Foo::PRIVATE_DEFINED,
  28. $h = self::PRIVATE_DEFINED,
  29. $i = self::UNDEFINED,
  30. $j = Foo::UNDEFINED,
  31. $k = bar::DEFINED,
  32. $l = Undefined::ANY,
  33. $m = DEFINED,
  34. $n = UNDEFINED,
  35. $o = NS_DEFINED,
  36. $p = parent::PUBLIC_DEFINED,
  37. ) {
  38. }
  39. }