bug63055.phpt 521 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #63055 (Segfault in zend_gc with SF2 testsuite)
  3. --FILE--
  4. <?php
  5. /* the default gc root size is 10,000 */
  6. for ($i=0; $i<9998; $i++) {
  7. $array = array();
  8. $array[0] = &$array;
  9. unset($array);
  10. }
  11. $matches = array("foo" => "bar"); /* this bucket will trigger the segfault */
  12. $dummy = array("dummy"); /* used to trigger gc_collect_cycles */
  13. $dummy[1] = &$dummy;
  14. $matches[1] = &$matches;
  15. $matches[2] = $dummy;
  16. preg_match_all("/(\d)+/", "foo123456bar", $matches);
  17. echo "okey";
  18. ?>
  19. --EXPECT--
  20. okey