base64_decode
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Decodes data encoded with MIME base64
base64_decode
(
string $string
,
bool $strict
=
false
):
string
|
false
return
false
;
}
return
base64_encode
(
base64_decode
(
$this
->
data
)) ===
str_replace
([
"\n"
,
"\r"
],
''
,
$this
->
data
);
}
src/Intervention/Image/AbstractDecoder.php
preg_match
(
$pattern
,
str_replace
([
"\n"
,
"\r"
],
''
,
$data_url
),
$matches
);
if (
is_array
(
$matches
) &&
array_key_exists
(
'data'
,
$matches
)) {
return
base64_decode
(
$matches
[
'data'
]);
}
return
null
;
src/Intervention/Image/AbstractDecoder.php
case
$this
->
isBase64
():
return
$this
->
initFromBinary
(
base64_decode
(
$this
->
data
));
default:
throw new
NotReadableException
(
"Image source not readable"
);
src/Intervention/Image/AbstractDecoder.php