Bug #78386 [Opn->Ver]: fstat mode has unexpected value on PHP 7.4
| From: | cmb@php.net | Date: | Fri, 09 Aug 2019 08:19:10 +0000 |
| Subject: | Bug #78386 [Opn->Ver]: fstat mode has unexpected value on PHP 7.4 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222154@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78386&edit=1
ID: 78386
Updated by: cmb@php.net
Reported by: theodorejb at outlook dot com
Summary: fstat mode has unexpected value on PHP 7.4
-Status: Open
+Status: Verified
Type: Bug
Package: Filesystem function related
Operating System: Windows 10
PHP Version: 7.4.0beta2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thanks for reporting!
Previous Comments:
------------------------------------------------------------------------
[2019-08-08 20:01:22] theodorejb at outlook dot com
Description:
------------
PHP 7.4 beta 2 returns a different fstat mode value for file pointers than PHP 7.3. This is causing
functionality in Slim-Psr7 to break.
Test script:
---------------
<?php
$handle = popen('echo 12', 'r');
$stats = fstat($handle);
var_dump($stats['mode']); // PHP 7.3 prints 4096, PHP 7.4 beta 2 prints 33206
$isPipe = ($stats['mode'] & 0010000) !== 0;
var_dump($isPipe); // PHP 7.3 prints true, PHP 7.4 beta 2 prints false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78386&edit=1