Write an infinite loop in PHP

Discussion in 'PHP' started by aurora1, Aug 9, 2007.

  1. #1
    can someone Write an infinite loop in PHP for me please?
     
    aurora1, Aug 9, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    
    ignore_user_abort();
    set_time_limit(0);
    
    while (true)
    {
        // Your stuff here
    }
    
    PHP:
     
    nico_swd, Aug 10, 2007 IP
  3. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #3
    :D :D

    Maybe you shouldn't include ignore_user_abort(), after all, someone who doesn't know how to make an infinite loop probably doesn't know about the problems it can cause, especially without a time limit that will cause the script to run indefinitely!
     
    krt, Aug 10, 2007 IP