Bug #78101 [Opn]: Incorrect behaviour for substr on Windows

From: Date: Fri, 12 Jul 2019 15:08:37 +0000
Subject: Bug #78101 [Opn]: Incorrect behaviour for substr on Windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221725@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78101&edit=1

 ID:                 78101
 User updated by:    mishamosher at gmail dot com
 Reported by:        mishamosher at gmail dot com
 Summary:            Incorrect behaviour for substr on Windows
 Status:             Open
 Type:               Bug
 Package:            opcache
 Operating System:   Windows 10 1903 64-bits
 PHP Version:        7.2.19
 Block user comment: N
 Private report:     N

 New Comment:

I confirm that this issue is no longer present in PHP 7.2.20 for my environment.


Previous Comments:
------------------------------------------------------------------------
[2019-07-12 15:04:10] nikic@php.net

I want to check back whether this issue still exists in PHP 7.2.20. The 7.2.19 release had some
serious issues with opcache and it may be that this is a side-effect of the same problems.

------------------------------------------------------------------------
[2019-06-04 21:59:49] cmb@php.net

Related To: Bug #78106

------------------------------------------------------------------------
[2019-06-04 17:59:21] mishamosher at gmail dot com

Hello cmb@php.net,

Results with OPCache on:
string(6) "2f6573" string(2) "ff"

Results with OPCache off:
string(6) "2f6573" string(2) "2f"

------------------------------------------------------------------------
[2019-06-04 09:02:49] cmb@php.net

Please run the following variation of your script, and report the
results:

    <?php
    $in = "/es";
    $out = substr($in, 0, 1);
    var_dump(bin2hex($in), bin2hex($out));
    ?>

------------------------------------------------------------------------
[2019-06-04 01:56:44] requinix@php.net

If removing opcache makes your problem go away then this may be a bug after all.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=78101


--
Edit this bug report at https://bugs.php.net/bug.php?id=78101&edit=1


Thread (11 messages)

« previous php.bugs (#221725) next »