You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
286 B

  1. --TEST--
  2. SPL: FixedArray: Assigning the itself object
  3. --FILE--
  4. <?php
  5. $b = 10;
  6. $a = new SplFixedArray($b);
  7. try {
  8. $a[1] = $a;
  9. } catch (Exception $e) {
  10. echo $e->getMessage(), "\n";
  11. }
  12. foreach ($a as $c) {
  13. if ($c) {
  14. echo $c->getSize(), "\n";
  15. }
  16. }
  17. print "ok\n";
  18. ?>
  19. --EXPECT--
  20. 10
  21. ok