0303 php functions

Youngin Lee·2021년 3월 3일
0

microtime()

🔗
Return current Unix timestamp with microseconds.

<?php
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}
echo microtime_float();
?>

strpos()

🔗
Find the numeric position of the first occurrence of needle in the haystack string.

strpos ( string $haystack , string $needle , int $offset = 0 ) : int|false
profile
🤔🤔

0개의 댓글