is_resource
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is a resource
is_resource
(
mixed $value
):
bool
$value
,
match (
true
) {
is_int
(
$value
) =>
PDO
::
PARAM_INT
,
is_resource
(
$value
) =>
PDO
::
PARAM_LOB
,
default =>
PDO
::
PARAM_STR
},
);
src/Illuminate/Database/Connection.php
return
true
;
}
is_resource
(
$contents
)
?
$this
->
driver
->
writeStream
(
$path
,
$contents
,
$options
)
:
$this
->
driver
->
write
(
$path
,
$contents
,
$options
);
} catch (
UnableToWriteFile
|
UnableToSetVisibility $e
) {
src/Illuminate/Filesystem/FilesystemAdapter.php
$path
=
trim
(
$path
.
'/'
.
$name
,
'/'
),
$stream
,
$options
);
if (
is_resource
(
$stream
)) {
fclose
(
$stream
);
}
src/Illuminate/Filesystem/FilesystemAdapter.php