number_format
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Format a number with grouped thousands
number_format
(
float $num
,
int $decimals
=
0
,
?
string $decimal_separator
=
"."
,
?
string $thousands_separator
=
","
):
string
throw
$e
;
} finally {
$runTime
=
$task
? (
' '
.
number_format
((
microtime
(
true
) -
$startTime
) *
1000
,
2
).
'ms'
)
:
''
;
$runTimeWidth
=
mb_strlen
(
$runTime
);
src/Illuminate/Console/View/Components/Task.php
protected function
asDecimal
(
$value
,
$decimals
)
{
return
number_format
(
$value
,
$decimals
,
'.'
,
''
);
}
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
$this
->
output
->
write
(
" <fg=gray>
{
$formattedStartedAt
}
</>
{
$job
->
resolveName
()}
"
);
}
$runTime
=
number_format
((
microtime
(
true
) -
$this
->
latestStartedAt
) *
1000
,
2
).
'ms'
;
$dots
=
max
(
terminal
()->
width
() -
mb_strlen
(
$job
->
resolveName
()) -
mb_strlen
(
$runTime
) -
31
,
0
);
$this
->
output
->
write
(
' '
.
str_repeat
(
'<fg=gray>.</>'
,
$dots
));
src/Illuminate/Queue/Console/WorkCommand.php