number_format
laravel/octane
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
$terminalWidth
=
$this
->
getTerminalWidth
();
$url
=
parse_url
(
$request
[
'url'
],
PHP_URL_PATH
) ?:
'/'
;
$duration
=
number_format
(
round
(
$request
[
'duration'
],
2
),
2
,
'.'
,
''
);
$memory
= isset(
$request
[
'memory'
])
? (
number_format
(
$request
[
'memory'
] /
1024
/
1204
,
2
,
'.'
,
''
).
' mb '
)
src/Commands/Concerns/InteractsWithIO.php
$duration
=
number_format
(
round
(
$request
[
'duration'
],
2
),
2
,
'.'
,
''
);
$memory
= isset(
$request
[
'memory'
])
? (
number_format
(
$request
[
'memory'
] /
1024
/
1204
,
2
,
'.'
,
''
).
' mb '
)
:
''
;
[
'method'
=>
$method
,
'statusCode'
=>
$statusCode
] =
$request
;
src/Commands/Concerns/InteractsWithIO.php