Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7065925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:01:04+00:00 2026-05-28T05:01:04+00:00

Is there any actual difference between these two lines of code? ini_set(‘max_execution_time’, 20*60); set_time_limit(20*60);

  • 0

Is there any actual difference between these two lines of code?

ini_set('max_execution_time', 20*60);
set_time_limit(20*60);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:01:04+00:00Added an answer on May 28, 2026 at 5:01 am

    Looking at the current source:

    /* {{{ proto bool set_time_limit(int seconds)
       Sets the maximum time a script can run */
    PHP_FUNCTION(set_time_limit)
    {
        zend_long new_timeout;
        char *new_timeout_str;
        int new_timeout_strlen;
        zend_string *key;
    
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &new_timeout) == FAILURE) {
            return;
        }
    
        new_timeout_strlen = zend_spprintf(&new_timeout_str, 0, ZEND_LONG_FMT, new_timeout);
    
        key = zend_string_init("max_execution_time", sizeof("max_execution_time")-1, 0);
        if (zend_alter_ini_entry_chars_ex(key, new_timeout_str, new_timeout_strlen, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC) == SUCCESS) {
            RETVAL_TRUE;
        } else {
            RETVAL_FALSE;
        }
        zend_string_release(key);
        efree(new_timeout_str);
    }
    /* }}} */
    

    set_time_limit() is indeed just a convenience wrapper around the according ini_set() call. It doesn’t even seem to perform the advertised timer reset. (But I would guess the “timer” actually isn’t a separate entity, but the ini value itself is used as such.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any difference in efficiency (e.g. execution time, code size, etc.) between these
Are there any speed/efficiency differences between the following two lines. $(table td:not(:first-child)) and $(table
Is there any difference between int on_exit(void (*function)(int , void *), void *arg); and
I am wondering if there is any difference in runtime between a generic container
Need some help understanding what the difference between these two redirects is: header( HTTP/1.1
Is there any efficiency difference in an explicit vs implicit inner join? For example:
In the context of the n-tier application, is there a difference between what you
Possible Duplicate: Is there an actual difference in the 2 different ways of attaching
I can't seem to find any information on what the actual differences are between
What is the difference between using the two following statements? It appears to me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.