microtime
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return current Unix timestamp with microseconds
microtime
(
bool $as_float
=
false
):
string
|
float
return
false
;
}
$context
= [
'timestamp'
=>
microtime
(
true
)];
foreach (
$this
->
contextProviders
as
$name
=>
$provider
) {
$context
[
$name
] =
$provider
->
getContext
();
}
Server/Connection.php
$cloner
= new
VarCloner
();
$data
=
$cloner
->
cloneVar
(
'foo'
);
$connection
= new
Connection
(
self
::
VAR_DUMPER_SERVER
);
$start
=
microtime
(
true
);
$this
->
assertFalse
(
$connection
->
write
(
$data
));
$this
->
assertLessThan
(
4
,
microtime
(
true
) -
$start
);
}
Tests/Server/ConnectionTest.php
$connection
= new
Connection
(
self
::
VAR_DUMPER_SERVER
);
$start
=
microtime
(
true
);
$this
->
assertFalse
(
$connection
->
write
(
$data
));
$this
->
assertLessThan
(
4
,
microtime
(
true
) -
$start
);
}
private function
getServerProcess
():
Process
Tests/Server/ConnectionTest.php