can set time limit work from within a function php code example Example: PHP Time Limit: set_time_limit(300);