is_file
laravel/octane
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Tells whether the filename is a regular file
is_file
(
string $filename
):
bool
|
if (!
is_file
(
$autoload_file
=
$basePath
.
'/vendor/autoload.php'
)) {
fwrite
(
STDERR
,
"Composer autoload file was not found. Did you install the project's dependencies?"
.
PHP_EOL
);
exit(
10
);
bin/bootstrap.php
function
move_uploaded_file
(
$from
,
$to
)
{
return
\is_file
(
$from
) &&
\rename
(
$from
,
$to
);
}
fixes/fix-symfony-file-moving.php
return
$pathToFile
&&
!
in_array
(
pathinfo
(
$pathToFile
,
PATHINFO_EXTENSION
), [
'php'
,
'htaccess'
,
'config'
]) &&
str_starts_with
(
$pathToFile
,
$publicPath
) &&
is_file
(
$pathToFile
);
}
src/Swoole/SwooleClient.php