Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Fatal error: Maximum function nesting level of '100' reached, aborting!
code46
post
Post #1





Grupa: Zarejestrowani
Postów: 88
Pomógł: 0
Dołączył: 21.04.2005

Ostrzeżenie: (0%)
-----


  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ń?
Go to the top of the page
+Quote Post
Jarod
post
Post #2





Grupa: Zarejestrowani
Postów: 1 190
Pomógł: 27
Dołączył: 23.04.2005

Ostrzeżenie: (0%)
-----


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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 22:53