[php-src] Issue #8087: Should \is_file support phar://some.phar?
| From: | brambaud | Date: | Sat, 12 Feb 2022 14:08:55 +0000 |
| Subject: | [php-src] Issue #8087: Should \is_file support phar://some.phar? | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239708@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8087
Author: brambaud
### Description
Hello!
I'm not sure if it is a bug or the expected behavior 🤔
The following code:
```php
<?php
$path = 'phar://'.__DIR__.'/some.phar';
\var_dump(
\file_exists($path),
\is_file($path),
);
```
Resulted in this output:
```
bool(true)
bool(false)
```
But I expected this output instead:
```
bool(true)
bool(true)
```
I know that
realpath does not work with virtual path like Phar and I wonder if it is
the same for is_file? 🤔
If yes then don't hesitate to close the issue and I will open a PR to document it if
that's ok with you 😃
### PHP Version
8.1.0
### Operating System
macOS 12.2