php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49474 use set_time_limit() trow an Warning info.
Submitted: 2009-09-05 16:58 UTC Modified: 2009-09-06 04:18 UTC
From: hack988 at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 6SVN-2009-09-05 (snap) OS: windows
Private report: No CVE-ID: None
 [2009-09-05 16:58 UTC] hack988 at gmail dot com
Description:
------------
I'm test set_time_limit function with no param,it trow an warning info.I have see description in online manual:
When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out. 

It's means this function with no param must work well.

BTW:I'm test codes in php6-dev and php 5.2.9 all of them trow an warning.:(

Reproduce code:
---------------
set_time_limit(50);
set_time_limit();
exit;

Expected result:
----------------
Warning: set_time_limit() expects exactly 1 parameter, 0 given in xxxxxxx on line 3
PHP Warning: set_time_limit() expects exactly 1 parameter, 0 given in xxxxxxx on line 3 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-05 18:36 UTC] felipe@php.net
Negative. You misread the description. 'set_time_limit()' was used just to indicate the function name.
 [2009-09-06 04:18 UTC] hack988 at gmail dot com
Ohh,I see,I'm sorry for my mistake
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 27 23:00:03 2025 UTC