stack.php 256 B

1234567891011121314151617181920
  1. <?php
  2. co::set(['stack_size' => 8192*4]);
  3. function test($n)
  4. {
  5. $a = 1;
  6. $b = 2;
  7. $c = 3;
  8. $d = 4;
  9. static $i;
  10. usleep(100000);
  11. echo "index=".($i++)."\n";
  12. return test($n + $a + $b + $c + $d);
  13. }
  14. go(function () {
  15. test(9);
  16. });