mb_strlen
brefphp/bref
Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Get string length
mb_strlen
(
string $string
, ?
string $encoding
=
null
):
int
'httpMethod'
=>
'POST'
,
'headers'
=> [
'Content-Type'
=>
'application/json'
,
'Content-Length'
=>
mb_strlen
(
json_encode
(
'Hello world!'
)),
],
'body'
=>
json_encode
(
'Hello world!'
),
];
tests/Handler/FpmHandlerTest.php
'httpMethod'
=>
'POST'
,
'body'
=>
'foo=bar&bim=baz'
,
'headers'
=> [
'Content-Length'
=>
mb_strlen
(
'foo=bar&bim=baz'
),
],
];
$this
->
assertGlobalVariables
(
$event
, [
tests/Handler/FpmHandlerTest.php
'headers'
=> [
'content-type'
=>
'application/json'
,
'content-length'
=>
mb_strlen
(
'{}'
),
],
'body'
=>
'{}'
,
];
tests/Handler/FpmHandlerTest.php
'httpMethod'
=>
'POST'
,
'headers'
=> [
'Content-Type'
=>
'multipart/form-data; boundary=testBoundary'
,
'Content-Length'
=>
mb_strlen
(
$body
),
],
'body'
=>
$body
,
];
tests/Handler/FpmHandlerTest.php
'httpMethod'
=>
'POST'
,
'headers'
=> [
'Content-Type'
=>
'multipart/form-data; boundary=testBoundary'
,
'Content-Length'
=>
mb_strlen
(
$body
),
],
'body'
=>
$body
,
];
tests/Handler/FpmHandlerTest.php
'httpMethod'
=>
'POST'
,
'headers'
=> [
'Content-Type'
=>
'multipart/form-data; boundary=testBoundary'
,
'Content-Length'
=>
mb_strlen
(
$body
),
],
'body'
=>
$body
,
];
tests/Handler/FpmHandlerTest.php
'isBase64Encoded'
=>
true
,
'headers'
=> [
'Content-Type'
=>
'application/x-www-form-urlencoded'
,
'Content-Length'
=>
mb_strlen
(
'foo=bar'
),
],
'body'
=>
base64_encode
(
'foo=bar'
),
];
tests/Handler/FpmHandlerTest.php