fast-finish-fiber.phpt 279 B

1234567891011121314151617
  1. --TEST--
  2. Fast finishing fiber does not leak
  3. --FILE--
  4. <?php
  5. $fiber = new Fiber(fn() => 'test');
  6. var_dump($fiber->isStarted());
  7. var_dump($fiber->start());
  8. var_dump($fiber->getReturn());
  9. var_dump($fiber->isTerminated());
  10. ?>
  11. --EXPECT--
  12. bool(false)
  13. NULL
  14. string(4) "test"
  15. bool(true)