Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Fatal error: Maximum function nesting level of '100' reached, aborting!
Forum PHP.pl > Forum > Przedszkole
code46
  1. <?php
  2. class test
  3. {
  4.    public function say()
  5.    {
  6.        echo 'test<br>';
  7.        $this->say();
  8.    }
  9. }
  10. ?>

Wyświetla mi kilkanaście linijek z napisem test a następnie błąd: Fatal error: Maximum function nesting level of '100' reached, aborting!

Jak zwiększyć maksymalną ilość wywołań rekurencyjnych (najlepiej z poziomu kodu php a nie php.ini)? Najlepiej żeby nie było ograniczeń?
Jarod
Cytat
PHP has a default limit of 100 before it dies:

Fatal error: Maximum function nesting level of '100' reached, aborting!

Edit: You can change the limit with ini_set('xdebug.max_nesting_level', 100000);, but if you go above about 1150 iterations PHP crashes:

[Fri Oct 24 11:39:41 2008] [notice] Parent: child process exited with status 3221225477 -- Restarting.


źródło: http://stackoverflow.com/questions/233013/...-deep-recursion
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.