public static function getPidFromFile($pidFile, $check = false)
    {
        if ($pidFile && file_exists($pidFile)) {
            $pid = (int)file_get_contents($pidFile);

            // check
            if ($check && self::isRunning($pid)) {
                return $pid;
            }

            unlink($pidFile);
        }

        return 0;
    }
public static function getPidFromFile($pidFile, $check = false)
    {
        if ($pidFile && file_exists($pidFile)) {
            $pid = (int)file_get_contents($pidFile);

            // check
            if ($check && self::isRunning($pid)) {
                return $pid;
            }

            unlink($pidFile);
        }

        return 0;
    }
public static function getPidFromFile ( $ pidFile , $ check = false ) { if ( $ pidFile && file_exists ( $ pidFile ) ) { $ pid = ( int ) file_get_contents ( $ pidFile ) ; // check if ( $ check && self :: isRunning ( $ pid ) ) { return $ pid ; } unlink ( $ pidFile ) ; } return 0 ; }
get Pid from File
@param string $pidFile
@param bool $check
@return int
get Pid from File