[PHP-BUG] Bug #78296 [NEW]: is_file fails to detect file

[email protected] ("v-altruo at microsoft dot com")
Newsgroups php.bugs,php.qa
Message-ID <[email protected]>
From:             v-altruo at microsoft dot com
Operating system: Windows
PHP version:      7.4.0alpha3
Package:          Testing related
Bug Type:         Bug
Bug description:is_file fails to detect file

Description:
------------
Test fails across all builds regardless of opcache on/off. Looked a bit
into it, the "is_file($file)" is the part that fails. 

Failed Test Location: ext\standard\tests\file\bug75679.phpt 

Test script:
---------------
<?php
$d = __DIR__;
$Files2Report =
 [
  str_pad ($d . '/' . str_repeat (str_pad
('bug75679_path_259_characters_long_', 100, '_') . '/', 1), 259, '_') =>
[],
  str_pad ($d . '/' . str_repeat (str_pad
('bug75679_path_260_characters_long_', 100, '_') . '/', 1), 260, '_') =>
[],
  str_pad ($d . '/' . str_repeat (str_pad
('bug75679_path_261_characters_long_', 100, '_') . '/', 1), 261, '_') =>
[],
 ];
foreach ($Files2Report as $file => &$Report)
 {
  $Report = ['strlen' => strlen ($file), 'result' => 'nok'];

  if (! is_dir (dirname ($file))) mkdir (dirname ($file), 0777, true);
  if (copy (__FILE__, $file) && is_file ($file))
   {
    $Report['result'] = 'ok';
   }

  print_r ($Report);
 }


?>

Expected result:
----------------
Array
(
    [strlen] => 259
    [result] => ok
)
Array
(
    [strlen] => 260
    [result] => ok
)
Array
(
    [strlen] => 261
    [result] => ok
)
==DONE==

Actual result:
--------------
Array
(
    [strlen] => 259
    [result] => ok
)
Array
(
    [strlen] => 260
    [result] => nok
)
Array
(
    [strlen] => 261
    [result] => nok
)
==DONE==

-- 
Edit bug report at https://bugs.php.net/bug.php?id=78296&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=78296&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=78296&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=78296&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=78296&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=78296&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=78296&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=78296&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=78296&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=78296&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=78296&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=78296&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=78296&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=78296&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78296&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=78296&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=78296&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=78296&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78296&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=78296&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=78296&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.