| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/robotics/wp-content/plugins/search-and-replace/inc/Service/ |
Upload File : |
<?php
namespace Inpsyde\SearchReplace\Service;
/**
* Class RunTime - set the service time out up to 0
*
* @package Inpsyde\SearchReplace\Service
*/
class MaxExecutionTime {
/**
* @var int
*/
private $met;
/**
* Store current timelimit and set a limit
*
* @param int $time
*/
public function set( $time = 0 ) {
if ( 0 === $time ) {
$this->store();
}
@set_time_limit( $time );
}
/**
* Restore timelimit.
*/
public function restore() {
$this->set( $this->met );
}
/**
* Fetch the max_execution_time from php.ini.
*/
public function store() {
$this->met = (int) ini_get( 'max_execution_time' );
}
}