is_file
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Tells whether the filename is a regular file
is_file
(
string $filename
):
bool
$ellipsisTail
=
$ellipsis
->
attr
[
'ellipsis-tail'
] ??
0
;
$ellipsis
=
$ellipsis
->
attr
[
'ellipsis'
] ??
0
;
if (
is_file
(
$f
[
'file'
]) &&
0
<=
self
::
$srcContext
) {
if (!empty(
$f
[
'class'
]) && (
is_subclass_of
(
$f
[
'class'
],
'Twig\Template'
) ||
is_subclass_of
(
$f
[
'class'
],
'Twig_Template'
)) &&
method_exists
(
$f
[
'class'
],
'getDebugInfo'
)) {
$template
=
null
;
if (isset(
$f
[
'object'
])) {
Caster/ExceptionCaster.php
$templateSrc
=
method_exists
(
$template
,
'getSourceContext'
) ?
$template
->
getSourceContext
()->
getCode
() : (
method_exists
(
$template
,
'getSource'
) ?
$template
->
getSource
() :
''
);
$templateInfo
=
$template
->
getDebugInfo
();
if (isset(
$templateInfo
[
$f
[
'line'
]])) {
if (!
method_exists
(
$template
,
'getSourceContext'
) || !
is_file
(
$templatePath
=
$template
->
getSourceContext
()->
getPath
())) {
$templatePath
=
null
;
}
if (
$templateSrc
) {
Caster/ExceptionCaster.php
return;
}
if (!
is_file
(
$href
)) {
return;
}
if (
$line
) {
Caster/LinkStub.php
if (
'C'
===
$class
[
0
] &&
str_starts_with
(
$class
,
'ComposerAutoloaderInit'
)) {
$r
= new
\ReflectionClass
(
$class
);
$v
=
\dirname
(
$r
->
getFileName
(),
2
);
if (
is_file
(
$v
.
'/composer/installed.json'
)) {
self
::
$vendorRoots
[] =
$v
.
\DIRECTORY_SEPARATOR
;
}
}
Caster/LinkStub.php
}
$parent
=
$dir
;
while (!@
is_file
(
$parent
.
'/composer.json'
)) {
if (!@
file_exists
(
$parent
)) {
break;
Caster/LinkStub.php
$componentRoot
=
$_SERVER
[
'COMPONENT_ROOT'
];
if (!
is_file
(
$file
=
$componentRoot
.
'/vendor/autoload.php'
)) {
$file
=
$componentRoot
.
'/../../../../vendor/autoload.php'
;
}
Tests/Fixtures/dump_server.php