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 23.11.2008, 20:06:12
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 23.11.2008, 20:13:46
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


--------------------
”Godzina nauki w życiu nowoczesnego apostoła jest godziną modlitwy.”
(św. Josemaría Escrivá, Droga, 335)
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 21.05.2024 - 10:45