anonymousClass.test 375 B

12345678910111213141516171819202122232425262728
  1. Anonymous classes
  2. -----
  3. <?php
  4. new class {};
  5. new class extends A implements B, C {};
  6. new class($a) extends A {
  7. private $a;
  8. public function __construct($a) {
  9. $this->a = $a;
  10. }
  11. };
  12. -----
  13. new class
  14. {
  15. };
  16. new class extends A implements B, C
  17. {
  18. };
  19. new class($a) extends A
  20. {
  21. private $a;
  22. public function __construct($a)
  23. {
  24. $this->a = $a;
  25. }
  26. };