# set_time_limit has no effect

- Thread: https://externals.io/message/55774
- Original archive: https://news-web.php.net/php.internals/55774
- Started by Laruence on 2011-10-11T07:34:48+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #55774 — Laruence — 2011-10-11T07:34:48+00:00

URL: https://externals.io/message/55774#55774

Hi:
     set_time_limit seems has no effect for this example(both CLI,
apache2handler) : http://pastebin.com/N3TxANhn
<?php
set_time_limit(1);

while(1) {

    $a = $arr['index_miss'];

    $a = $arr['index_miss'];

    $a = $arr['index_miss'];

    $a = $arr['index_miss'];


}

     but what is wired is , if I reduce the assignment statments to 1
in that while block,  it seems works well...

     like:
    <?php
set_time_limit(1);

while(1) {
    $a = $arr['index_miss'];
}


    anyidea?

thanks
-- 
Laruence  Xinchen Hui
http://www.laruence.com/

---

## #55775 — Laruence — 2011-10-11T07:58:46+00:00

URL: https://externals.io/message/55774#55775 · In reply to: #55774

Hi:
    with `E_NOTICE` open....

    and if I run the test script by php /tmp/test.php 2>log,    the
timeout mechanism works agian...

thanks

2011/10/11 Laruence <laruence@php.net>:
> Hi:
>     set_time_limit seems has no effect for this example(both CLI,
> apache2handler) : http://pastebin.com/N3TxANhn
> <?php
> set_time_limit(1);
>
> while(1) {
>
>    $a = $arr['index_miss'];
>
>    $a = $arr['index_miss'];
>
>    $a = $arr['index_miss'];
>
>    $a = $arr['index_miss'];
>
>
> }
>
>     but what is wired is , if I reduce the assignment statments to 1
> in that while block,  it seems works well...
>
>     like:
>    <?php
> set_time_limit(1);
>
> while(1) {
>    $a = $arr['index_miss'];
> }
>
>
>    anyidea?
>
> thanks
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

---

## #55776 — Laruence — 2011-10-11T08:03:02+00:00

URL: https://externals.io/message/55774#55776 · In reply to: #55775

Hi;
   sorry for noise, I think I found out why. ignore me.

thanks

2011/10/11 Laruence <laruence@php.net>:
> Hi:
>    with `E_NOTICE` open....
>
>    and if I run the test script by php /tmp/test.php 2>log,    the
> timeout mechanism works agian...
>
> thanks
>
> 2011/10/11 Laruence <laruence@php.net>:
> > […]
>
>
>
> --
> Laruence  Xinchen Hui
> http://www.laruence.com/
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/
