PageRenderTime 292ms queryTime 51ms sortTime 7ms getByIdsTime 81ms findMatchingLines 96ms

100+ results results for 'php microtime' (292 ms)

Not the results you expected?
init.php https://gitlab.com/mattswann/launch-housing | PHP | 368 lines
                    
1<?php
                    
2
                    
2
                    
3// DO NOT CALL THIS CLASS DIRECTLY. CALL VIA: pb_backupbuddy_destination in bootstrap.php.
                    
4
                    
24		'url'			=>		'',		// optional url for migration that corresponds to this ftp/path.
                    
25		'disable_file_management'	=>		'0',		// When 1, _manage.php will not load which renders remote file management DISABLED.
                    
26		'disabled'					=>		'0',		// When 1, disable this destination.
                    
82			} else {
                    
83				pb_backupbuddy::status( 'details',  'Your web server doesnt support FTPS in PHP.', 'error' );
                    
84				return false;
                    
95			} else {
                    
96				pb_backupbuddy::status( 'details',  'Your web server doesnt support FTP in PHP.', 'error' );
                    
97				return false;
                    
137			if ( ! file_exists( $file ) ) {
                    
138				pb_backupbuddy::status( 'error', 'Error #859485495. Could not upload local file `' . $file . '` to send to FTP as it does not exist. Verify the file exists, permissions of file, parent directory, and that ownership is correct. You may need suphp installed on the server.' );
                    
139			}
                    
                
StatementPrefetch.php https://gitlab.com/reasonat/test8 | PHP | 537 lines
                    
1<?php
                    
2
                    
153    if (!empty($logger)) {
                    
154      $query_start = microtime(TRUE);
                    
155    }
                    
187    if (!empty($logger)) {
                    
188      $query_end = microtime(TRUE);
                    
189      $logger->log($this, $args, $query_end - $query_start);
                    
464    $result = array();
                    
465    // Traverse the array as PHP would have done.
                    
466    while (isset($this->currentRow)) {
                    
483      $result = array();
                    
484      // Traverse the array as PHP would have done.
                    
485      while (isset($this->currentRow)) {
                    
506    $result = array();
                    
507    // Traverse the array as PHP would have done.
                    
508    while (isset($this->currentRow)) {
                    
                
Store.php https://gitlab.com/susmitha.plts/photographer_portfolio | PHP | 707 lines
                    
1<?php
                    
2
                    
196    {
                    
197        return sha1(uniqid('', true).Str::random(25).microtime(true));
                    
198    }
                    
                
NetClient.php https://gitlab.com/wuhang2003/rainloop-webmail | PHP | 629 lines
                    
1<?php
                    
2
                    
187	 */
                    
188	public function capturePhpErrorWithException($iErrNo, $sErrStr, $sErrFile, $iErrLine)
                    
189	{
                    
247
                    
248		$this->iStartConnectTime = \microtime(true);
                    
249		$this->writeLog('Start connection to "'.$this->sConnectedHost.':'.$this->iConnectedPort.'"',
                    
270
                    
271		\set_error_handler(array(&$this, 'capturePhpErrorWithException'));
                    
272
                    
297
                    
298		$this->writeLog((\microtime(true) - $this->iStartConnectTime).' (raw connection)',
                    
299			\MailSo\Log\Enumerations\Type::TIME);
                    
348			{
                    
349				$this->writeLog((\microtime(true) - $this->iStartConnectTime).' (net session)',
                    
350					\MailSo\Log\Enumerations\Type::TIME);
                    
                
DatabaseBackend.php https://gitlab.com/geeta7/drupal | PHP | 485 lines
                    
1<?php
                    
2
                    
209        'expire' => $item['expire'],
                    
210        'created' => round(microtime(TRUE), 3),
                    
211        'tags' => implode(' ', $item['tags']),
                    
                
DebugBar.php https://gitlab.com/ducnv/BTL_CN_WEB | PHP | 468 lines
                    
1<?php
                    
2/*
                    
46
                    
47    protected $stackSessionNamespace = 'PHPDEBUGBAR_STACK_DATA';
                    
48
                    
183     *
                    
184     * If no http driver where defined, a PhpHttpDriver is automatically created
                    
185     *
                    
190        if ($this->httpDriver === null) {
                    
191            $this->httpDriver = new PhpHttpDriver();
                    
192        }
                    
206                'datetime' => date('Y-m-d H:i:s'),
                    
207                'utime' => microtime(true),
                    
208                'method' => isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null,
                    
253     */
                    
254    public function getDataAsHeaders($headerName = 'phpdebugbar', $maxHeaderLength = 4096, $maxTotalHeaderLength = 250000)
                    
255    {
                    
                
mediaaccess.php https://gitlab.com/thisishayat/itv-2016 | PHP | 414 lines
                    
1<?php
                    
2
                    
96	{
                    
97		return substr(md5(microtime() . rand()), rand(0,25), 6);
                    
98	}
                    
203		
                    
204		return 'media-upload.php?post_id=' . $post_ID . '&tab=' . $tab . '&TB_iframe=1';
                    
205	}
                    
308
                    
309		$file = basename(parse_url($uri, PHP_URL_PATH));
                    
310
                    
310
                    
311		if ($uri AND in_array($file, array('post.php', 'post-new.php')))
                    
312		{
                    
367
                    
368						$('[class*="<?php echo $this->button_class_name; ?>"]').on('click', function()
                    
369						{
                    
                
linkchecker.php https://gitlab.com/dkiller1/rapidleech | PHP | 234 lines
                    
1<?php
                    
2if (!defined('RAPIDLEECH')) {
                    
2if (!defined('RAPIDLEECH')) {
                    
3	require('../deny.php');
                    
4	exit;
                    
9//Lets calulate the time required.
                    
10$time = explode(' ', microtime());
                    
11$time = $time[1] + $time[0];
                    
14$debug = 0; // change it to one to enable it.
                    
15//Override PHP's stardard time limit
                    
16set_time_limit(120);
                    
205
                    
206// Load /classes/http.php or paste the function?...
                    
207function GetCookiesArr($content, $cookie=array(), $del=true, $dval=array('','deleted')) {
                    
227		echo "<b>".lang(118)."</b><br />";
                    
228	if( PHP_VERSION < 5 ){
                    
229		echo lang(119)."<br />";
                    
                
LBFactory.php https://gitlab.com/link233/bootmw | PHP | 481 lines
                    
1<?php
                    
2/**
                    
220
                    
221		$start = microtime( true );
                    
222		$this->forEachLBCallMethod( 'commitAll', [ $fname ] );
                    
222		$this->forEachLBCallMethod( 'commitAll', [ $fname ] );
                    
223		$timeMs = 1000 * ( microtime( true ) - $start );
                    
224
                    
432		);
                    
433		if ( PHP_SAPI === 'cli' ) {
                    
434			$chronProt->setEnabled( false );
                    
                
mysql.php https://gitlab.com/nacridan/Nacridan | PHP | 372 lines
                    
1<?php
                    
2
                    
10if (!function_exists('mysql_connect'))
                    
11	exit('This PHP environment doesn\'t have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance.');
                    
12
                    
70		if (defined('PUN_SHOW_QUERIES'))
                    
71			$q_start = get_microtime();
                    
72
                    
80			if (defined('PUN_SHOW_QUERIES'))
                    
81				$this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
                    
82
                    
                
List.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 271 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
182        }
                    
183        $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
                    
184        return $block;
                    
                
Bouncer.php git://github.com/znarf/Bouncer.git | PHP | 645 lines
                    
1<?php
                    
2
                    
375
                    
376        $this->addContext('time', microtime(true));
                    
377
                    
407        // Measure execution time
                    
408        $execution_time = microtime(true) - $context['time'];
                    
409        if (!empty($context['bouncer']['throttle_time'])) {
                    
560        else {
                    
561            // $this->error('No exit callable set. PHP exit construct will be used.');
                    
562            exit;
                    
                
03formulas.php https://gitlab.com/thohid44/Complete_Sumitted_Project_Without_Filter_Search | PHP | 149 lines
                    
33
                    
34define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
                    
35
                    
36/** Include PHPExcel */
                    
37require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
                    
38
                    
41echo date('H:i:s') , " Create new PHPExcel object" , EOL;
                    
42$objPHPExcel = new PHPExcel();
                    
43
                    
108
                    
109$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
                    
110
                    
132
                    
133$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
                    
134$objWriter->save(str_replace('.php', '.xls', __FILE__));
                    
                
PhpBackend.php https://gitlab.com/reasonat/test8 | PHP | 271 lines
                    
4
                    
5use Drupal\Core\PhpStorage\PhpStorageFactory;
                    
6use Drupal\Component\Utility\Crypt;
                    
11 * Stores cache items in a PHP file using a storage that implements
                    
12 * Drupal\Component\PhpStorage\PhpStorageInterface.
                    
13 *
                    
13 *
                    
14 * This is fast because of PHP's opcode caching mechanism. Once a file's
                    
15 * content is stored in PHP's opcode cache, including it doesn't require
                    
20 */
                    
21class PhpBackend implements CacheBackendInterface {
                    
22
                    
248   *
                    
249   * @return \Drupal\Component\PhpStorage\PhpStorageInterface
                    
250   */
                    
                
Mandrill.php https://gitlab.com/x33n/platform | PHP | 118 lines
                    
1<?php
                    
2class Mandrill {
                    
28        $this->ch = curl_init();
                    
29        curl_setopt($this->ch, CURLOPT_USERAGENT, 'like Mandrill-PHP/1.0.18');
                    
30        curl_setopt($this->ch, CURLOPT_POST, true);
                    
53
                    
54        $start = microtime(true);
                    
55        $this->log('Call to ' . $this->root . $url . '.json: ' . $params);
                    
56        if($this->debug) {
                    
57            $curl_buffer = fopen('php://memory', 'w+');
                    
58            curl_setopt($ch, CURLOPT_STDERR, $curl_buffer);
                    
62        $info = curl_getinfo($ch);
                    
63        $time = microtime(true) - $start;
                    
64        if($this->debug) {
                    
                
wp-background-process.php https://gitlab.com/campus-academy/krowkaramel | PHP | 503 lines
                    
1<?php // @codingStandardsIgnoreLine.
                    
2/**
                    
138	 *
                    
139	 * Generates a unique key based on microtime. Queue items are
                    
140	 * given a unique key so that they can be merged upon save.
                    
146	protected function generate_key( $length = 64 ) {
                    
147		$unique  = md5( microtime() . rand() );
                    
148		$prepend = $this->identifier . '_batch_';
                    
234
                    
235		set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration );
                    
236	}
                    
                
Mandrill.php https://gitlab.com/urbanjunglestudio/movidly_admin | PHP | 161 lines
                    
1<?php
                    
2
                    
2
                    
3require_once 'Mandrill/Templates.php';
                    
4require_once 'Mandrill/Exports.php';
                    
4require_once 'Mandrill/Exports.php';
                    
5require_once 'Mandrill/Users.php';
                    
6require_once 'Mandrill/Rejects.php';
                    
6require_once 'Mandrill/Rejects.php';
                    
7require_once 'Mandrill/Inbound.php';
                    
8require_once 'Mandrill/Tags.php';
                    
8require_once 'Mandrill/Tags.php';
                    
9require_once 'Mandrill/Messages.php';
                    
10require_once 'Mandrill/Whitelists.php';
                    
10require_once 'Mandrill/Whitelists.php';
                    
11require_once 'Mandrill/Ips.php';
                    
12require_once 'Mandrill/Internal.php';
                    
                
Dispatcher.php https://gitlab.com/isdzulqor/Slis-Dev | PHP | 201 lines
                    
1<?php
                    
2/**
                    
23 *
                    
24 * ```php
                    
25 * [
                    
48 *
                    
49 * ```php
                    
50 * Yii::$app->log->targets['file']->enabled = false;
                    
189                        __METHOD__,
                    
190                        microtime(true),
                    
191                        [],
                    
                
captcha_pi.php https://gitlab.com/MichelZuniga/neoinvoice | PHP | 356 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
66	'image' => IMAGE TAG
                    
67	'time'	=> TIMESTAMP (in microtime)
                    
68	'word'	=> CAPTCHA WORD
                    
196			
                    
197	list($usec, $sec) = explode(" ", microtime());
                    
198	$now = ((float)$usec + (float)$sec);
                    
246			
                    
247	// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
248	if (function_exists('imagecreatetruecolor'))
                    
354
                    
355/* End of file captcha_pi.php */
                    
356/* Location: ./system/plugins/captcha_pi.php */
                    
                
PasswordHash.php https://gitlab.com/wildanoo/E-procurement | PHP | 248 lines
                    
1<?php
                    
2#
                    
2#
                    
3# Portable PHP password hashing framework.
                    
4#
                    
13#
                    
14#	http://www.openwall.com/phpass/
                    
15#
                    
42
                    
43		$this->random_state = microtime() . getmypid();
                    
44	}
                    
57				$this->random_state =
                    
58				    md5(microtime() . $this->random_state);
                    
59				$output .=
                    
94		$output .= $this->itoa64[min($this->iteration_count_log2 +
                    
95			((PHP_VERSION >= '5') ? 5 : 3), 30)];
                    
96		$output .= $this->encode64($input, 6);
                    
                
Fishing.php https://gitlab.com/Skull3x/Plugins | PHP | 367 lines
                    
1<?php
                    
2// This Plugin is Made by DeBe (hu6677@naver.com)
                    
224		if(!isset($this->cool[$n])) $this->cool[$n] = 0;
                    
225		$c = microtime(true) - $this->cool[$n];
                    
226		if($this->cool[$n] == -1){
                    
251	public function fishGive($p){
                    
252		$this->cool[$p->getName()] = microtime(true) + $this->set->get("Cool");
                    
253		$i = $this->getFish();
                    
                
srai_lookup.php https://gitlab.com/tutaalexandr/bot_local | PHP | 160 lines
                    
1<?php
                    
2  /***************************************
                    
5    * Version: 2.4.8
                    
6    * FILE: srai_lookup.php
                    
7    * AUTHOR: Elizabeth Perreau and Dave Morton
                    
14  $form_vars = array_merge((array)$post_vars, (array)$get_vars);
                    
15  //exit('Form vars:<pre>' . PHP_EOL . print_r($form_vars, true));
                    
16  $action = (isset($form_vars['action'])) ? $form_vars['action'] : '';
                    
45  $countSTH = $dbConn->prepare($countSQL);
                    
46  /** @noinspection PhpUndefinedVariableInspection */
                    
47  $countSTH->bindValue(':bot_id', $bot_id, PDO::PARAM_INT);
                    
65  $msg = '';
                    
66  $timeStart = microtime(true);
                    
67  // Drop the index on the table srai_lookup to speed things up
                    
79  $searchSQL = "select id, bot_id, template from aiml where template like '%<srai>%' order by id asc;";
                    
80  $es = microtime(true);
                    
81  $searchSTH = $dbConn->prepare($searchSQL);
                    
                
AbstractSessionArrayStorage.php https://gitlab.com/jalon/doadoronline | PHP | 487 lines
                    
1<?php
                    
2/**
                    
55        $_SESSION = $input;
                    
56        $this->setRequestAccessTime(microtime(true));
                    
57    }
                    
                
mssql.php https://gitlab.com/bulwye/reliquerunt | PHP | 418 lines
                    
1<?php
                    
2/***************************************************************************
                    
2/***************************************************************************
                    
3 *                                 mssql.php
                    
4 *                            -------------------
                    
5 *   begin                : Saturday, Feb 13, 2001
                    
6 *   copyright            : (C) 2001 The phpBB Group
                    
7 *   email                : supportphpbb.com
                    
8 *
                    
9 *   $Id: mssql.php,v 1.22.2.4 2006/03/09 19:57:37 grahamje Exp $
                    
10 *
                    
155				{
                    
156					$this->result = time() + microtime();
                    
157
                    
172				{
                    
173					$this->result = time() + microtime();
                    
174
                    
                
Profiler.php https://gitlab.com/php.bjoernbartels.earth/profiler | PHP | 569 lines
                    
110    /**
                    
111     * get php's 'real' memory usage
                    
112     * 
                    
191    /**
                    
192     * retrieve memory usage from system/php
                    
193     * 
                    
195     * @return integer
                    
196     * @see    http://php.net/manual/de/function.memory-get-usage.php
                    
197     */
                    
221     * @return Profiler
                    
222     * @see    http://php.net/manual/de/function.memory-get-usage.php
                    
223     */
                    
234     * @return boolean
                    
235     * @see    http://php.net/manual/de/function.memory-get-usage.php
                    
236     */
                    
                
init.php https://gitlab.com/mattswann/launch-housing | PHP | 257 lines
                    
1<?php
                    
2
                    
49		
                    
50		self::$_timeStart = microtime( true );
                    
51		
                    
59		
                    
60		require_once( pb_backupbuddy::plugin_path() . '/classes/remote_api.php' );
                    
61		
                    
121			$isFileTest = false;
                    
122			if ( false !== stristr( basename( $file ), 'remote-send-test.php' ) ) {
                    
123				$isFileTest = true;
                    
169			if ( true === $dataRemains ) { // More data remains so see if we need to consider chunking to a new PHP process.
                    
170				// If we are within X second of reaching maximum PHP runtime then stop here so that it can be picked up in another PHP process...
                    
171				if ( ( ( microtime( true ) - self::$_timeStart ) + self::TIME_WIGGLE_ROOM ) >= $settings['max_time'] ) {
                    
171				if ( ( ( microtime( true ) - self::$_timeStart ) + self::TIME_WIGGLE_ROOM ) >= $settings['max_time'] ) {
                    
172					pb_backupbuddy::status( 'message', 'Approaching limit of available PHP chunking time of `' . $settings['max_time'] . '` sec. Ran for ' . round( microtime( true ) - self::$_timeStart, 3 ) . ' sec. Proceeding to use chunking.' );
                    
173					@fclose( $fs );
                    
                
Heuristics.php https://gitlab.com/mrceperka/mi-paa | PHP | 598 lines
                    
1<?php
                    
2namespace MrCeperka\MIPAA\Heuristics;
                    
3
                    
4require_once 'Helpers.php';
                    
5
                    
30	{
                    
31		$start = microtime(true);
                    
32		$pairs = $this->beforeCompute();
                    
33		$r = $this->compute($pairs);
                    
34		$end = microtime(true) - $start;
                    
35		$end *= 1000 * 1000;
                    
398			
                    
399			/*echo 'maxPrice: ' . $maxPrice . PHP_EOL;
                    
400			echo 'bits: ' . $b . PHP_EOL;
                    
400			echo 'bits: ' . $b . PHP_EOL;
                    
401			echo 'me:' . $maxError . PHP_EOL;*/
                    
402		}
                    
                
func.php https://gitlab.com/Oasisnejeb/yml_helper_for_cs-cart | PHP | 132 lines
                    
1<?php
                    
2
                    
11function fn_yml_helper_check_products () {
                    
12	$start = microtime(true);
                    
13	$options = Registry::get('addons.yml_helper');
                    
123	if ($disable_disabled) db_query("UPDATE ?:products SET ?u WHERE status = ?s", $deny_product, 'D');
                    
124	fn_print_r('Время выполнения : '.(microtime(true) - $start).' сек.');
                    
125}
                    
                
minifyTextarea.php https://gitlab.com/flyhope/Hiblog | PHP | 186 lines
                    
1<?php
                    
2die('Disabled: use this only for testing');
                    
3
                    
4require __DIR__ . '/../../bootstrap.php';
                    
5
                    
16if (isset($_POST['textIn'])) {
                    
17    require '../config.php';
                    
18    $textIn = str_replace("\r\n", "\n", getPost('textIn'));
                    
40    $source = new Minify_Source($sourceSpec);
                    
41    Minify_Logger::setLogger(FirePHP::getInstance(true));
                    
42
                    
71    $tpl['inBytes'] = strlen($textIn);
                    
72    $startTime = microtime(true);
                    
73    try {
                    
79    }
                    
80    $tpl['time'] = microtime(true) - $startTime;
                    
81    $tpl['outBytes'] = strlen($tpl['output']);
                    
                
Log.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 247 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
119		$this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
                    
120			? ltrim($config['log_file_extension'], '.') : 'php';
                    
121
                    
181			$newfile = TRUE;
                    
182			// Only add protection to php files
                    
183			if ($this->_file_ext === 'php')
                    
184			{
                    
185				$message .= "<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>\n\n";
                    
186			}
                    
199			$microtime_full = microtime(TRUE);
                    
200			$microtime_short = sprintf("%06d", ($microtime_full - floor($microtime_full)) * 1000000);
                    
201			$date = new DateTime(date('Y-m-d H:i:s.'.$microtime_short, $microtime_full));
                    
                
wrapper.php https://gitlab.com/webkod3r/tripolis | PHP | 213 lines
                    
1<?php
                    
2
                    
18
                    
19function akismet_microtime() {
                    
20	return Akismet::_get_microtime();
                    
                
Mailer.php https://gitlab.com/VTTE/sitios-vtte | PHP | 460 lines
                    
1<?php
                    
2
                    
39	 *
                    
40	 * @param \WPMailSMTP\MailCatcher $phpmailer
                    
41	 */
                    
41	 */
                    
42	public function __construct( $phpmailer ) {
                    
43
                    
43
                    
44		// We want to prefill everything from \WPMailSMTP\MailCatcher class, which extends \PHPMailer.
                    
45		parent::__construct( $phpmailer );
                    
195					'content'  => $content_value,
                    
196					'charset'  => $this->phpmailer->CharSet,
                    
197					'encoding' => $this->phpmailer->Encoding,
                    
203
                    
204			if ( $this->phpmailer->ContentType === 'text/plain' ) {
                    
205				$content_type = 'text/plain';
                    
                
MinkTestCase.php https://gitlab.com/x33n/ImpressPages | PHP | 203 lines
                    
1<?php
                    
2
                    
3
                    
4namespace PhpUnit\Helper;
                    
5
                    
6
                    
7class MinkTestCase extends \PHPUnit_Framework_TestCase
                    
8{
                    
42    {
                    
43        static::stopSession($this->session, $this->getStatus() == \PHPUnit_Runner_BaseTestRunner::STATUS_PASSED);
                    
44
                    
75                'build' => getenv('TRAVIS_BUILD_NUMBER'),
                    
76                'tags' => array(getenv('TRAVIS_PHP_VERSION'), 'CI')
                    
77            );
                    
145
                    
146        $start = microtime(true);
                    
147
                    
                
micro_bench.php https://gitlab.com/envieidoc/advancedtomato2 | PHP | 358 lines
                    
1<?php
                    
2
                    
240
                    
241function getmicrotime()
                    
242{
                    
249  ob_start();
                    
250  return getmicrotime();
                    
251}
                    
256  global $last_time;
                    
257  $end = getmicrotime();
                    
258  ob_end_clean();
                    
269  ob_start();
                    
270  return getmicrotime();
                    
271}
                    
                
centAcl-Func.php https://gitlab.com/florianocomercial/centreon | PHP | 418 lines
                    
1<?php
                    
2
                    
40
                    
41function microtime_float2() {
                    
42    list($usec, $sec) = explode(" ", microtime());
                    
                
index.markdown https://gitlab.com/orvi2014/phpjs | Markdown | 382 lines
                    
2layout: page
                    
3title: "PHP functions for JavaScript"
                    
4comments: false
                    
14<!-- Generated by Rakefile:build -->
                    
15If you are missing functions, there is a chance you may find them in our [experimental](https://github.com/kvz/phpjs/tree/master/experimental) 
                    
16and [workbench](https://github.com/kvz/phpjs/tree/master/workbench) folders. Warning: we keep 
                    
127 - [idate](/functions/idate)
                    
128 - [microtime](/functions/microtime)
                    
129 - [mktime](/functions/mktime)
                    
                
CronHelper.php https://gitlab.com/remyvianne/krowkaramel | PHP | 222 lines
                    
1<?php
                    
2
                    
216  public function enforceExecutionLimit($timer) {
                    
217    $elapsedTime = microtime(true) - $timer;
                    
218    if ($elapsedTime >= $this->getDaemonExecutionLimit()) {
                    
                
class-phpass.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 250 lines
                    
6 * @version 0.5 / WordPress
                    
7 * @link https://www.openwall.com/phpass/
                    
8 */
                    
10#
                    
11# Portable PHP password hashing framework.
                    
12#
                    
36/**
                    
37 * Portable PHP password hashing framework.
                    
38 *
                    
40 * @version 0.5 / WordPress
                    
41 * @link https://www.openwall.com/phpass/
                    
42 * @since 2.5.0
                    
147		# cryptographic primitive that was available in all versions
                    
148		# of PHP in use.  To implement our own low-level crypto in PHP
                    
149		# would have resulted in much worse performance and
                    
                
pp_payflow_iframe.php https://gitlab.com/shapcy/opencart | PHP | 153 lines
                    
1<?php
                    
2class ControllerPaymentPPPayflowIframe extends Controller {
                    
24
                    
25		$secure_token_id = md5($this->session->data['order_id'] . mt_rand() . microtime());
                    
26
                    
                
demo.browse.dhtml.php git://pkgs.fedoraproject.org/php-getid3 | PHP | 442 lines
                    
19// | DHTML techniques compatible with MSIE5 and Mozilla.                   |
                    
20// | dependencies: getid3, extras/abstration.php, getid3.css              |
                    
21// +----------------------------------------------------------------------+
                    
22//
                    
23// $Id: demo.browse.dhtml.php,v 1.4 2006/12/03 19:28:17 ah Exp $
                    
24
                    
62function getmicrotime() {
                    
63    list($usec, $sec) = explode(' ', microtime());
                    
64	return ((float) $usec + (float) $sec);
                    
75    echo '<head>';
                    
76    echo '<title>getID3() - /demos/demo.browse.php (sample script)</title>';
                    
77    echo "<meta http-equiv='Content-Style-Type' content='text/css'>";
                    
92    echo xml_gen::br();
                    
93    echo xml_gen::p('getID3() ' . getid3::VERSION . '.<br>PHP ' . phpversion() . ' (' . implode(xml_gen::space(2), $support) . ').');
                    
94    echo xml_gen::p(xml_gen::a('http://getid3.sourceforge.net/', 'http://getid3.sourceforge.net'));
                    
                
04printing.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 125 lines
                    
22 * @package    PHPExcel
                    
23 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
42echo date('H:i:s') , " Create new PHPExcel object" , EOL;
                    
43$objPHPExcel = new PHPExcel();
                    
44
                    
78$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
                    
79$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
                    
80
                    
93
                    
94$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
                    
95$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
                    
108
                    
109$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
                    
110$objWriter->save(str_replace('.php', '.xls', __FILE__));
                    
                
WindLogger.php https://gitlab.com/wuhang2003/phpwind | PHP | 549 lines
                    
1<?php
                    
2/**
                    
20 * @author Qian Su <aoxue.1988.su.qian@163.com>
                    
21 * @copyright ©2003-2103 phpwind.com
                    
22 * @license http://www.windframework.com
                    
22 * @license http://www.windframework.com
                    
23 * @version $Id: WindLogger.php 3904 2013-01-08 07:01:26Z yishuo $
                    
24 * @package log
                    
249		if ($level === self::LEVEL_PROFILE)
                    
250			$message = $this->_build($msg, $level, $type, microtime(true), 
                    
251				$this->getMemoryUsage(false));
                    
252		elseif ($level === self::LEVEL_DEBUG)
                    
253			$message = $this->_build($msg, $level, $type, microtime(true));
                    
254		else
                    
314		$pid = getmypid();
                    
315		if (strncmp(PHP_OS, 'WIN', 3) === 0) {
                    
316			exec('tasklist /FI "PID eq ' . $pid . '" /FO LIST', $output);
                    
                
cron.php https://gitlab.com/Gashler/dp | PHP | 414 lines
                    
1<?php
                    
2/**
                    
197	if ( ! $gmt_time )
                    
198		$gmt_time = microtime( true );
                    
199
                    
239
                    
240		WP_DEBUG ? include_once( ABSPATH . 'wp-cron.php' ) : @include_once( ABSPATH . 'wp-cron.php' );
                    
241		return;
                    
247	$cron_request = apply_filters( 'cron_request', array(
                    
248		'url' => site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ),
                    
249		'key' => $doing_wp_cron,
                    
264
                    
265	// Prevent infinite loops caused by lack of wp-cron.php
                    
266	if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) )
                    
271
                    
272	$gmt_time = microtime( true );
                    
273	$keys = array_keys( $crons );
                    
                
bootstrap.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 440 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Basic CakePHP functionality.
                    
4 *
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @link          http://cakephp.org CakePHP(tm) Project
                    
16 * @package       Cake
                    
16 * @package       Cake
                    
17 * @since         CakePHP(tm) v 0.2.9
                    
18 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
20
                    
21define('TIME_START', microtime(true));
                    
22
                    
                
DatabaseHandle.php https://gitlab.com/tomgidden/php-DatabaseObject | PHP | 375 lines
                    
1<?php
                    
2  /* DatabaseHandle
                    
6
                    
7require_once('DatabaseObject/common/vars.php');
                    
8
                    
19   *
                    
20   * The prepared query caching may not be necessary, as I think DB.php
                    
21   * does this itself.
                    
99	if(defined('TIMINGS') and TIMINGS) {
                    
100	  list($usec, $sec) = explode(" ",microtime());
                    
101	  $start =  ((float)$usec + (float)$sec);
                    
177	if(defined('TIMINGS') and TIMINGS) {
                    
178	  list($usec, $sec) = explode(" ",microtime());
                    
179	  $end =  ((float)$usec + (float)$sec);
                    
230	if(defined('TIMINGS') and TIMINGS) {
                    
231	  list($usec, $sec) = explode(" ",microtime());
                    
232	  $start =  ((float)$usec + (float)$sec);
                    
                
WidgetDetailEvent.php https://gitlab.com/mautic-master/mautic | PHP | 299 lines
                    
1<?php
                    
2/**
                    
45        $this->translator = $translator;
                    
46        $this->startTime = microtime();
                    
47    }
                    
163        $this->widget->setTemplateData($templateData);
                    
164        $this->widget->setLoadTime(abs(microtime() - $this->startTime));
                    
165
                    
                
Message.php https://gitlab.com/luisrepo/ClienteWS | PHP | 246 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Message.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
24/**
                    
25 * A message envelope that can be passed to Zend_Wildfire_Plugin_FirePhp to be
                    
26 * logged to Firebug instead of a variable.
                    
33 */
                    
34class Zend_Wildfire_Plugin_FirePhp_Message
                    
35{
                    
91        $this->_message = $message;
                    
92        $this->_ruid = md5(microtime().mt_rand());
                    
93    }
                    
                
Loader.php https://gitlab.com/r.collas/site_central | PHP | 548 lines
                    
1<?php
                    
2/**
                    
12
                    
13require_once 'Exception.php';
                    
14
                    
167
                    
168		return str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
                    
169
                    
246
                    
247		list($tps_usec, $tps_sec) = explode(" ", microtime());
                    
248
                    
275		$space = $is_cli ? ' ' : '&nbsp;';
                    
276		$crlf = $is_cli ? PHP_EOL : '<br />';
                    
277		
                    
302
                    
303		if($this->getRequest()->isCli() || PHP_VERSION < '5.3')
                    
304			return print_r($var, true);
                    
                
Store.php https://gitlab.com/techniconline/kmc | PHP | 672 lines
                    
1<?php namespace Illuminate\Session;
                    
2
                    
189    {
                    
190        return sha1(uniqid('', true) . str_random(25) . microtime(true));
                    
191    }
                    
                
ClassMapGeneratorTest.php https://gitlab.com/pr0055/symfonypizza | PHP | 145 lines
                    
83                'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php',
                    
84                'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php',
                    
85                'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php',
                    
106            array(__DIR__.'/Fixtures/php5.4', array(
                    
107                'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
108                'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
109                'Foo\\TBar' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
110                'Foo\\IBar' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
111                'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
111                'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
112                'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php',
                    
113            )),
                    
114            array(__DIR__.'/Fixtures/php5.5', array(
                    
115                'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php',
                    
116            )),
                    
                
Random.php https://gitlab.com/reasonat/test8 | PHP | 299 lines
                    
1<?php
                    
2
                    
141  public function word($length) {
                    
142    mt_srand((double) microtime() * 1000000);
                    
143
                    
159  /**
                    
160   * Generates a random PHP object.
                    
161   *
                    
                
class.utils.php https://gitlab.com/sokeara/Tribal_Education | PHP | 351 lines
                    
1<?php
                    
2// Exit if accessed directly
                    
15    /** 
                    
16     * Get current microtime as a float. Can be used for simple profiling.
                    
17     */
                    
17     */
                    
18    static public function get_microtime() {
                    
19        return microtime(true);
                    
95    /** 
                    
96     *  PHP_SAPI for fcgi requires a data flush of at least 256
                    
97     *  bytes every 40 seconds or else it forces a script hault
                    
327		//FALL BACK: Windows XP has bug with glob, 
                    
328		//add secondary check for PHP lameness
                    
329		if ($dh = opendir('.')) 
                    
                
Old.php https://gitlab.com/Skull3x/Small-ZC-Plugins | PHP | 308 lines
                    
1<?php
                    
2
                    
29	public function onEnable(){
                    
30		$time = microtime(true);
                    
31		echo ".";
                    
39		$time *= -1;
                    
40		$time += microtime(true);
                    
41		$time *= 1000;
                    
41		$time *= 1000;
                    
42		echo " Done! ($time ms)" . PHP_EOL;
                    
43	}
                    
241		$this->getLogger()->debug("Saving CLB database...");
                    
242		$time = microtime(true);
                    
243		$buffer = self::MAGIC_PREFIX;
                    
259		$this->getLogger()->debug("Loading CLB database...");
                    
260		$time = 0 - microtime(true);
                    
261		$str = @file_get_contents($this->path);
                    
                
class.jetpack-sync-queue.php https://gitlab.com/hunt9310/ras | PHP | 459 lines
                    
1<?php
                    
2
                    
47		// this basically tries to add the option until enough time has elapsed that
                    
48		// it has a unique (microtime-based) option key
                    
49		while ( ! $added ) {
                    
112		if ( preg_match( '/^jpsq_' . $this->id . '-(\d+\.\d+)-/', $first_item_name, $matches ) ) {
                    
113			return microtime( true ) - floatval( $matches[1] );
                    
114		} else {
                    
391		// at the same time
                    
392		// TODO: confirm we only need to support PHP 5.05+ (otherwise we'll need to emulate microtime as float, and avoid PHP_INT_MAX)
                    
393		// @see: http://php.net/manual/en/function.microtime.php
                    
393		// @see: http://php.net/manual/en/function.microtime.php
                    
394		$timestamp = sprintf( '%.6f', microtime( true ) );
                    
395
                    
396		// row iterator is used to avoid collisions where we're writing data waaay fast in a single process
                    
397		if ( $this->row_iterator === PHP_INT_MAX ) {
                    
398			$this->row_iterator = 0;
                    
                
sql.inc.php https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework | PHP | 238 lines
                    
1<?php
                    
2if (!$error && $_POST["export"]) {
                    
59		$parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : '');
                    
60		$total_start = microtime(true);
                    
61		parse_str($_COOKIE["adminer_export"], $adminer_export);
                    
102						}
                    
103						$start = microtime(true);
                    
104						//! don't allow changing of character_set_results, convert encoding of displayed query
                    
157
                    
158							$start = microtime(true);
                    
159						} while ($connection->next_result());
                    
186<form action="" method="post" enctype="multipart/form-data" id="form">
                    
187<?php
                    
188$execute = "<input type='submit' value='" . lang('Execute') . "' title='Ctrl+Enter'>";
                    
                
captcha_helper.php https://gitlab.com/piratemovin/piratesite | PHP | 341 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
107
                    
108		$now = microtime(TRUE);
                    
109
                    
131
                    
132			// PHP7 or a suitable polyfill
                    
133			if (function_exists('random_int'))
                    
234		// Create image
                    
235		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
                    
236		$im = function_exists('imagecreatetruecolor')
                    
                
31docproperties_write.php https://gitlab.com/thohid44/Complete_Sumitted_Project_Without_Filter_Search | PHP | 119 lines
                    
22 * @package    PHPExcel
                    
23 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
37/** Include PHPExcel */
                    
38require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
                    
39
                    
48$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType);
                    
49$objPHPExcel = $objPHPExcelReader->load($inputFileName);
                    
50
                    
66echo date('H:i:s') , " Write to Excel2007 format" , EOL;
                    
67$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
                    
68$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
                    
78echo date('H:i:s') , " Reread Excel2007 file" , EOL;
                    
79$objPHPExcelRead = PHPExcel_IOFactory::load(str_replace('.php', '.xlsx', __FILE__));
                    
80
                    
                
footer.php https://gitlab.com/LibreTitan/Panther | PHP | 181 lines
                    
1<?php
                    
2/**
                    
48	// Load cached quick jump
                    
49	if (file_exists(FORUM_CACHE_DIR.'cache_quickjump_'.$panther_user['g_id'].'.php'))
                    
50		require FORUM_CACHE_DIR.'cache_quickjump_'.$panther_user['g_id'].'.php';
                    
54		if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
                    
55			require PANTHER_ROOT.'include/cache.php';
                    
56
                    
57		generate_quickjump_cache($panther_user['g_id']);
                    
58		require FORUM_CACHE_DIR.'cache_quickjump_'.$panther_user['g_id'].'.php';
                    
59	}
                    
143	// Calculate script generation time
                    
144	$time_diff = sprintf('%.3f', microtime(true) - $panther_start);
                    
145	$debug_info = sprintf($lang_common['Querytime'], $time_diff, $db->get_num_queries());
                    
                
CurlMultiHandler.php https://gitlab.com/ealexis.t/trends | PHP | 197 lines
                    
1<?php
                    
2namespace GuzzleHttp\Handler;
                    
82        if ($this->delays) {
                    
83            $currentTime = microtime(true);
                    
84            foreach ($this->delays as $id => $delay) {
                    
101            // Perform a usleep if a select returns -1.
                    
102            // See: https://bugs.php.net/bug.php?id=61141
                    
103            usleep(250);
                    
134        } else {
                    
135            $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000);
                    
136        }
                    
186    {
                    
187        $currentTime = microtime(true);
                    
188        $nextTime = PHP_INT_MAX;
                    
                
modresponse.class.php https://gitlab.com/haque.mdmanzurul/modx-improve-carolyn | PHP | 282 lines
                    
1<?php
                    
2/**
                    
106
                    
107            $totalTime= (microtime(true) - $this->modx->startTime);
                    
108            $queryTime= $this->modx->queryTime;
                    
112            $phpTime= $totalTime - $queryTime;
                    
113            $phpTime= sprintf("%2.4f s", $phpTime);
                    
114            $source= $this->modx->resourceGenerated ? "database" : "cache";
                    
116            $this->modx->resource->_output= str_replace("[^qt^]", $queryTime, $this->modx->resource->_output);
                    
117            $this->modx->resource->_output= str_replace("[^p^]", $phpTime, $this->modx->resource->_output);
                    
118            $this->modx->resource->_output= str_replace("[^t^]", $totalTime, $this->modx->resource->_output);
                    
174
                    
175        /* tell PHP to call _postProcess after returning the response (for caching) */
                    
176        register_shutdown_function(array (
                    
                
mod.php https://gitlab.com/potion/librechan | PHP | 216 lines
                    
1<?php
                    
2
                    
6
                    
7require 'inc/functions.php';
                    
8require 'inc/mod/pages.php';
                    
10if ($config['debug'])
                    
11	$parse_start_time = microtime(true);
                    
12
                    
147
                    
148$parse_start_time = microtime(true);
                    
149
                    
191			);
                    
192			$debug['time']['parse_mod_req'] = '~' . round((microtime(true) - $parse_start_time) * 1000, 2) . 'ms';
                    
193		}
                    
                
StandardTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 160 lines
                    
1<?php
                    
2/**
                    
9
                    
10class StandardTest extends \PHPUnit_Framework_TestCase
                    
11{
                    
12    /**
                    
13     * @var \Magento\Framework\Profiler\Driver\Standard\Stat|PHPUnit_Framework_MockObject_MockObject
                    
14     */
                    
61            'timer_id',
                    
62            $this->greaterThanOrEqual(microtime(true)),
                    
63            $this->greaterThanOrEqual(0),
                    
79            'timer_id',
                    
80            $this->greaterThanOrEqual(microtime(true)),
                    
81            $this->greaterThanOrEqual(0),
                    
                
Logger.php https://gitlab.com/nitm/yii2-module | PHP | 395 lines
                    
1<?php
                    
2
                    
38		parent::init();
                    
39		$this->currentUser = (\Yii::$app->hasProperty('user') && \Yii::$app->user->getId()) ? \Yii::$app->user->getIdentity() : new \nitm\models\User(['username' => (php_sapi_name() == 'cli' ? 'console' : 'web')]);
                    
40
                    
162			'action' => \Yii::$app->getModule('nitm')->getAlert()->store()->getStoredAction($event),
                    
163			'timestamp' => microtime(true),
                    
164			'table_name' => $event->sender->isWhat(),
                    
                
HttpCacheListener.php https://gitlab.com/Isaki/le331.fr | PHP | 168 lines
                    
1<?php
                    
2
                    
98            if (!is_numeric($age)) {
                    
99                $now = microtime(true);
                    
100
                    
108            if (!is_numeric($age)) {
                    
109                $now = microtime(true);
                    
110
                    
                
http.php https://gitlab.com/knowthecode/ktc-sandbox | PHP | 211 lines
                    
1<?php
                    
2/*
                    
51		} else {
                    
52			$start = microtime( true );
                    
53		}
                    
53		}
                    
54		$key = microtime( true ) . $url;
                    
55		$this->data['http'][$key] = array(
                    
130	public function log_http_response( $response, array $args, $url ) {
                    
131		$this->data['http'][$args['_qm_key']]['end']      = microtime( true );
                    
132		$this->data['http'][$args['_qm_key']]['response'] = $response;
                    
                
Generator.php https://gitlab.com/daveson/lacitypatterns | PHP | 174 lines
                    
1<?php
                    
2
                    
9 * Compiles and moves all files in the source/patterns dir to public/patterns dir ONCE.
                    
10 * Vast majority of logic is in builder.lib.php
                    
11 *
                    
28	/**
                    
29	* Pulls together a bunch of functions from builder.lib.php in an order that makes sense
                    
30	* @param  {Boolean}       decide if CSS should be parsed and saved. performance hog.
                    
37		if ($timePL) {
                    
38			$mtime = microtime(); 
                    
39			$mtime = explode(" ",$mtime); 
                    
134		if ($timePL) {
                    
135			$mtime = microtime();
                    
136			$mtime = explode(" ",$mtime);
                    
                
passwordLibClass.php https://gitlab.com/Raymon/QualityCaps_PHP | PHP | 354 lines
                    
6 * 
                    
7 * See: http://php.net/password_hash and http://php.net/password_verify
                    
8 * 
                    
150     * @param type $setting
                    
151     * @return \Antnee\PhpPasswordLib\PhpPasswordLib
                    
152     */
                    
178     * @param STRING $chars
                    
179     * @return \Antnee\PhpPasswordLib\PhpPasswordLib|boolean
                    
180     */
                    
194     * @param INT $algo
                    
195     * @return \Antnee\PhpPasswordLib\PhpPasswordLib
                    
196     */
                    
238     * 
                    
239     * @return \Antnee\PhpPasswordLib\PhpPasswordLib
                    
240     */
                    
                
PostImageHandler.php https://gitlab.com/wubbajack/insided-test | PHP | 288 lines
                    
1<?php namespace App\Core\Handlers;
                    
2
                    
251
                    
252        return hash('sha1', $prefix . microtime() . $file->getBasename()) . $extension;
                    
253    }
                    
                
ABackend.php https://gitlab.com/rsilveira1987/Expresso | PHP | 203 lines
                    
1<?php
                    
2/**
                    
60        
                    
61        $data['id'] = sha1(mt_rand(). microtime());
                    
62        
                    
110            $data = $stmt->fetch();
                    
111            $stmt = null; # see https://bugs.php.net/bug.php?id=44081
                    
112        } catch (Zend_Db_Statement_Exception $zdbse) {
                    
144    /**
                    
145     * (non-PHPdoc)
                    
146     * @see Syncroton_Backend_IBackend::delete()
                    
157    /**
                    
158     * (non-PHPdoc)
                    
159     * @see Syncroton_Backend_IBackend::update()
                    
                
04printing.php https://gitlab.com/abhijit13/taasika | PHP | 125 lines
                    
22 * @package    PHPExcel
                    
23 * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
42echo date('H:i:s') , " Create new PHPExcel object" , EOL;
                    
43$objPHPExcel = new PHPExcel();
                    
44
                    
78$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
                    
79$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
                    
80
                    
93
                    
94$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
                    
95$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
                    
108
                    
109$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
                    
110$objWriter->save(str_replace('.php', '.xls', __FILE__));
                    
                
OAuthRequest.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 290 lines
                    
1<?php
                    
2
                    
19    public static $version = '1.0';
                    
20    public static $POST_INPUT = 'php://input';
                    
21
                    
24        $parameters = ($parameters) ? $parameters : array();
                    
25        $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
                    
26        $this->parameters = $parameters;
                    
283    private static function generate_nonce() {
                    
284        $mt = microtime();
                    
285        $rand = mt_rand();
                    
                
TestClient.php https://gitlab.com/peter.tiedemann/thrift | PHP | 427 lines
                    
1<?php
                    
2
                    
2
                    
3namespace test\php;
                    
4
                    
4
                    
5require_once __DIR__.'/../../lib/php/lib/Thrift/ClassLoader/ThriftClassLoader.php';
                    
6
                    
9if (!isset($GEN_DIR)) {
                    
10  $GEN_DIR = 'gen-php';
                    
11}
                    
16$loader = new ThriftClassLoader();
                    
17$loader->registerNamespace('Thrift', __DIR__ . '/../../lib/php/lib');
                    
18$loader->registerDefinition('ThriftTest', $GEN_DIR);
                    
110
                    
111$start = microtime(true);
                    
112
                    
                
ConfigController.php https://gitlab.com/billyprice1/phpservermon | PHP | 359 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP Server Monitor
                    
4 * Monitor your servers and websites.
                    
5 *
                    
6 * This file is part of PHP Server Monitor.
                    
7 * PHP Server Monitor is free software: you can redistribute it and/or modify
                    
11 *
                    
12 * PHP Server Monitor is distributed in the hope that it will be useful,
                    
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
                    
17 * You should have received a copy of the GNU General Public License
                    
18 * along with PHP Server Monitor.  If not, see <http://www.gnu.org/licenses/>.
                    
19 *
                    
19 *
                    
20 * @package     phpservermon
                    
21 * @author      Pepijn Over <pep@peplab.net>
                    
                
PortalManager.php https://gitlab.com/Skull3x/BlockHunt | PHP | 121 lines
                    
1<?php
                    
2
                    
113		$particle1 = new PortalParticle ($pos1);
                    
114		$random = new Random (( int )(\microtime(\true) * 1000) + \mt_rand());
                    
115		for ($i = 0; $i < $count; ++$i) {
                    
                
Random.php https://gitlab.com/leoplanxxi/dr7-web-buap-2016 | PHP | 304 lines
                    
1<?php
                    
2
                    
146  public function word($length) {
                    
147    mt_srand((double) microtime()*1000000);
                    
148
                    
164  /**
                    
165   * Generates a random PHP object.
                    
166   *
                    
                
CFDBPermittedFunctions.php https://gitlab.com/mattswann/launch-housing | PHP | 237 lines
                    
1<?php
                    
2
                    
33
                    
34        // PHP functions
                    
35            'addcslashes',
                    
84            'date',
                    
85            'microtime',
                    
86            'strtotime',
                    
                
zetro_helper.php https://gitlab.com/zetrosoft/pos-ci | PHP | 367 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2	
                    
72	function lama_execute(){
                    
73		$awal = microtime(true);
                    
74		
                    
85		
                    
86		$akhir = microtime(true);
                    
87		$lama = $akhir - $awal;
                    
                
microtime.c https://gitlab.com/envieidoc/tomato | C | 166 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | PHP Version 5                                                        |
                    
4   +----------------------------------------------------------------------+
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
92   Returns either a string or a float containing the current time in seconds and microseconds */
                    
93PHP_FUNCTION(microtime)
                    
94{
                    
134#if !defined( _OSD_POSIX) && !defined(__BEOS__) /* BS2000 has only a few fields in the rusage struct */
                    
135	PHP_RUSAGE_PARA(ru_oublock);
                    
136	PHP_RUSAGE_PARA(ru_inblock);
                    
                
Installer.php https://gitlab.com/Ferreria/marcador | PHP | 192 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
11 * @link      http://cakephp.org CakePHP(tm) Project
                    
12 * @since     3.0.0
                    
12 * @since     3.0.0
                    
13 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
                    
14 */
                    
72    /**
                    
73     * Create the config/app.php file if it does not exist.
                    
74     *
                    
176
                    
177        $newKey = hash('sha256', $dir . php_uname() . microtime(true));
                    
178        $content = str_replace('__SALT__', $newKey, $content, $count);
                    
                
CoreCommand.php https://gitlab.com/cpteam/console | PHP | 445 lines
                    
1<?php
                    
2
                    
141				$this->logHr();
                    
142				$this->timer = 0 - microtime(true);
                    
143
                    
163				}
                    
164				$this->timer += microtime(true);
                    
165				$this->logHr();
                    
172				$this->logSystem(
                    
173					$this->table("Memory allocated (php)", "<yellow>" . round(memory_get_usage() / 1024 / 1024, 2) . " MB</yellow>")
                    
174				);
                    
                
QueueTest.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 105 lines
                    
1<?php
                    
2/**
                    
9
                    
10class QueueTest extends \PHPUnit_Framework_TestCase
                    
11{
                    
12    /**
                    
13     * @magentoDataFixture Magento/Newsletter/_files/queue.php
                    
14     * @magentoAppIsolation enabled
                    
59    /**
                    
60     * @magentoDataFixture Magento/Newsletter/_files/queue.php
                    
61     * @magentoAppIsolation enabled
                    
64    {
                    
65        $errorMsg = md5(microtime());
                    
66
                    
                
ProgressIndicator.php https://gitlab.com/Sigpot/AirSpot | PHP | 288 lines
                    
1<?php
                    
2
                    
163     * @param string   $name     The placeholder name (including the delimiter char like %)
                    
164     * @param callable $callable A PHP callable
                    
165     */
                    
179     *
                    
180     * @return callable|null A PHP callable
                    
181     */
                    
253    {
                    
254        return round(microtime(true) * 1000);
                    
255    }
                    
                
List.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 271 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
182        }
                    
183        $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime());
                    
184        return $block;
                    
                
OAuthRequest.php https://gitlab.com/CORP-RESELLER/sdk-core-php | PHP | 323 lines
                    
1<?php
                    
2namespace PayPal\Auth\Oauth;
                    
13    public static $version = '1.0';
                    
14    public static $POST_INPUT = 'php://input';
                    
15
                    
18        $parameters        = ($parameters) ? $parameters : array();
                    
19        $parameters        = array_merge(OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
                    
20        $this->parameters  = $parameters;
                    
317    {
                    
318        $mt   = microtime();
                    
319        $rand = mt_rand();
                    
                
Timer.php https://gitlab.com/karora/awl | PHP | 159 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * PHP_Timer
                    
4 *
                    
36 *
                    
37 * @package    PHP
                    
38 * @subpackage Timer
                    
41 * @license    http://www.opensource.org/licenses/BSD-3-Clause  The BSD 3-Clause License
                    
42 * @link       http://github.com/sebastianbergmann/php-timer
                    
43 * @since      File available since Release 1.0.0
                    
48 *
                    
49 * @package    PHP
                    
50 * @subpackage Timer
                    
54 * @version    Release: @package_version@
                    
55 * @link       http://github.com/sebastianbergmann/php-timer
                    
56 * @since      Class available since Release 1.0.0
                    
                
Thrift.php https://gitlab.com/haque.mdmanzurul/nga-loyaltymatters | PHP | 167 lines
                    
1<?php
                    
2
                    
44        if (!class_exists('Elasticsearch\\RestClient')) {
                    
45            throw new RuntimeException('Elasticsearch\\RestClient class not found. Check that suggested package munkie/elasticsearch-thrift-php is required in composer.json');
                    
46        }
                    
145            /* @var $result RestResponse */
                    
146            $start = microtime(true);
                    
147
                    
150
                    
151            $end = microtime(true);
                    
152        } catch (TException $e) {
                    
                
01pharSimple.php https://gitlab.com/Zinnurain/destination_finder_beta | PHP | 112 lines
                    
22 * @package    PHPExcel
                    
23 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
                    
24 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt	LGPL
                    
41echo date('H:i:s') , " Create new PHPExcel object" , EOL;
                    
42$objPHPExcel = new PHPExcel();
                    
43
                    
50							 ->setDescription("Test document for PHPExcel, generated using PHP classes.")
                    
51							 ->setKeywords("office PHPExcel php")
                    
52							 ->setCategory("Test result file");
                    
80
                    
81$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
                    
82$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
                    
95
                    
96$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
                    
97$objWriter->save(str_replace('.php', '.xls', __FILE__));
                    
                
HasOneOrMany.php https://gitlab.com/pthapa81/MeroSaaman-1.0 | PHP | 412 lines
                    
1<?php namespace Illuminate\Database\Eloquent\Relations;
                    
2
                    
99	{
                    
100		return 'self_'.md5(microtime(true));
                    
101	}
                    
                
DatabaseReminderRepository.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 195 lines
                    
1<?php namespace Illuminate\Auth\Reminders;
                    
2
                    
169
                    
170		$value = str_shuffle(sha1($email.spl_object_hash($this).microtime(true)));
                    
171
                    
                
database.php https://gitlab.com/LibreTitan/Panther | PHP | 306 lines
                    
1<?php
                    
2/**
                    
22			PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'",
                    
23			PDO::ATTR_EMULATE_PREPARES => false, // Prior to PHP 5.3.6, this was a security issue. We want actual prepared statements instead of "emulated" ones.
                    
24			PDO::ATTR_PERSISTENT => $config['p_connect'],
                    
77		if ($panther_config['o_show_queries'] == '1')
                    
78			$q_start = microtime(true);
                    
79
                    
87				if ($panther_config['o_show_queries'] == '1')
                    
88					$this->saved_queries[] = array($this->sql, sprintf('%.5f', microtime(true) - $q_start));
                    
89
                    
                
HungerGamesScoreBoardTask.php https://gitlab.com/Skull3x/WorkingInProgress-Plugins-Sourcecode-For-Dev | PHP | 318 lines
                    
1<?php
                    
2
                    
101					if ($lv->currentStep === GameLevelModel::STEP_HUNTING) {
                    
102						$diff = round ( $lv->currentMap->huntingFinishTime ) - (microtime ( true ));
                    
103						$message .= TextFormat::GRAY . "| " . TextFormat::AQUA . round ( $diff, 2 );
                    
104					} elseif ($lv->currentStep === GameLevelModel::STEP_DEATH_MATCH) {
                    
105						$diff = round ( $lv->currentMap->deathMatchFinishTime - (microtime ( true )) );
                    
106						$message .= TextFormat::GRAY . "| " . TextFormat::AQUA . round ( $diff, 2 );
                    
157		try {
                    
158			$start_time = microtime ( true );
                    
159			$this->showHelpFloatingText ();
                    
185			}
                    
186			// $this->plugin->log ( "[HungerGamesScoreBoardTask->onRun took " . (microtime ( true ) - $start_time) );
                    
187		} catch ( \Exception $e ) {
                    
                
MultipartBody.php https://gitlab.com/mattswann/launch-housing | PHP | 274 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP version 5
                    
6 *
                    
8 *
                    
9 * Copyright (c) 2008-2011, Alexey Borzov <avb@php.net>
                    
10 * All rights reserved.
                    
37 * @package    HTTP_Request2
                    
38 * @author     Alexey Borzov <avb@php.net>
                    
39 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
39 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
40 * @version    SVN: $Id: MultipartBody.php 308322 2011-02-14 13:58:03Z avb $
                    
41 * @link       http://pear.php.net/package/HTTP_Request2
                    
51 * @package    HTTP_Request2
                    
52 * @author     Alexey Borzov <avb@php.net>
                    
53 * @version    Release: 2.0.0beta1
                    
                
Timer.php https://gitlab.com/ealexis.t/trends | PHP | 107 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * This file is part of the PHP_Timer package.
                    
4 *
                    
4 *
                    
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
                    
6 *
                    
15 */
                    
16class PHP_Timer
                    
17{
                    
41    {
                    
42        array_push(self::$startTimes, microtime(true));
                    
43    }
                    
105} else {
                    
106    PHP_Timer::$requestTime = microtime(true);
                    
107}
                    
                
Timers.php https://gitlab.com/x33n/ampache | PHP | 104 lines
                    
1<?php
                    
2
                    
24    {
                    
25        return $this->time = microtime(true);
                    
26    }
                    
                
font_info.php https://gitlab.com/techniconline/kmc | PHP | 158 lines
                    
32
                    
33require_once "../classes/Font.php";
                    
34
                    
42
                    
43$t = microtime(true);
                    
44
                    
104        Memory: <?php echo(memory_get_peak_usage(true) / 1024); ?>KB &mdash;
                    
105        Time: <?php echo round(microtime(true) - $t, 4); ?>s
                    
106  <br/>
                    
106  <br/>
                    
107  <a href="make_subset.php?fontfile=<?php echo $fontfile; ?>&amp;name=<?php echo urlencode($font->getFontSubfamilyID()); ?>">Make
                    
108      a subset of this font</a>
                    
125                    <a <?php if (!$data) { ?> style="color: #ccc;" <?php } ?>
                    
126                        href="#tabs-<?php echo preg_replace("/[^a-z0-9]/i", "_", $tag); ?>"><?php echo $tag; ?></a>
                    
127                </li>
                    
                
Replace.php https://gitlab.com/iamgraeme/royalmile | PHP | 368 lines
                    
1<?php
                    
2namespace Inpsyde\SearchReplace\Database;
                    
8 * runs search & replace on a database
                    
9 * adapted from: https://github.com/interconnectit/Search-Replace-DB/blob/master/srdb.class.php
                    
10 *
                    
115			'updates'    => 0,
                    
116			'start'      => microtime(),
                    
117			'end'        => microtime(),
                    
141
                    
142		$table_report[ 'start' ] = microtime();
                    
143
                    
229
                    
230		$table_report[ 'end' ] = microtime( TRUE );
                    
231		$this->dbm->flush();
                    
316	 *
                    
317	 * @link   http://php.net/manual/en/function.mysql-real-escape-string.php#101248
                    
318	 * @access public
                    
                
config.php https://gitlab.com/lcapdecomme/monls | PHP | 485 lines
                    
1<?php
                    
2
                    
75
                    
76function getmicrotime()
                    
77{
                    
77{
                    
78    $tmp = explode( ' ', microtime() );
                    
79    return $tmp[1] . substr( $tmp[0], 1 );
                    
437      $entetemail .= "Reply-To: monls@free.fr \n"; // Adresse de retour
                    
438      $entetemail .= "X-Mailer: PHP/" . phpversion() . "\n" ;
                    
439    
                    
                
common.php https://gitlab.com/nacridan/Nacridan | PHP | 205 lines
                    
1<?php
                    
2
                    
32
                    
33// Attempt to load the configuration file config.php
                    
34if (file_exists(PUN_ROOT.'config.php'))
                    
34if (file_exists(PUN_ROOT.'config.php'))
                    
35	require PUN_ROOT.'config.php';
                    
36
                    
41// Load the functions script
                    
42require PUN_ROOT.'include/functions.php';
                    
43
                    
44// Load addon functionality
                    
45require PUN_ROOT.'include/addons.php';
                    
46
                    
47// Load UTF-8 functions
                    
48require PUN_ROOT.'include/utf8/utf8.php';
                    
49
                    
                
Version.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 326 lines
                    
1<?php
                    
2/*
                    
30 *
                    
31 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL
                    
32 * @link        www.doctrine-project.org
                    
216        try {
                    
217            $start = microtime(true);
                    
218
                    
260
                    
261            $end = microtime(true);
                    
262            $this->_time = round($end - $start, 2);
                    
                
McRegion.php https://gitlab.com/matthww/Elywing | PHP | 332 lines
                    
1<?php
                    
2
                    
93			"DayTime" => new IntTag("DayTime", 0),
                    
94			"LastPlayed" => new LongTag("LastPlayed", microtime(true) * 1000),
                    
95			"RandomSeed" => new LongTag("RandomSeed", $seed),
                    
                
PocketMine.php https://gitlab.com/matthww/Elywing | PHP | 486 lines
                    
1<?php
                    
2
                    
27				case is_array($var):
                    
28					echo str_repeat("  ", $cnt) . "array(" . count($var) . ") {" . PHP_EOL;
                    
29					foreach($var as $key => $value){
                    
40				case is_float($var):
                    
41					echo str_repeat("  ", $cnt) . "float(" . $var . ")" . PHP_EOL;
                    
42					break;
                    
95	if(version_compare("7.0", PHP_VERSION) > 0){
                    
96		echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL;
                    
97		echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
                    
101	if(!extension_loaded("pthreads")){
                    
102		echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL;
                    
103		echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
                    
439	if($errors > 0){
                    
440		$logger->critical("Please update your PHP from itxtech.org/download, or recompile PHP again.");
                    
441		$logger->shutdown();
                    
                
 

Source

Language