Permalink
Browse files

optimization _getmicrotime

  • Loading branch information...
1 parent fa75e79 commit 4d88799a6adcb2945235bff767eac647de910e27 @Gemorroj committed with xBBCoder Oct 1, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 bbcode.lib.php
View
@@ -1105,7 +1105,7 @@ function checkUrl($url) {
break;
}
}
- if (! $is_http) { $url = './'.$url; }
+ if (! $is_http) { $url = './' . $url; }
$url = htmlentities($url, ENT_QUOTES);
$url = str_replace('.', '&#'.ord('.').';', $url);
$url = str_replace(':', '&#'.ord(':').';', $url);
@@ -1118,8 +1118,7 @@ function checkUrl($url) {
Функция возвращает текущий UNIX timestamp с микросекундами в формате float
*/
function _getmicrotime() {
- list($usec, $sec) = explode(' ', microtime());
- return (float) $usec + (float) $sec;
+ return microtime(true);
}
/*

0 comments on commit 4d88799

Please sign in to comment.