|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69159 Opcache causes problem when passing a variable variable to a function
Submitted: 2015-03-02 15:09 UTC Modified: 2015-03-04 06:19 UTC
From: seb at rootsandrain dot com Assigned: laruence (profile)
Status: Closed Package: opcache
PHP Version: 5.6.6 OS: CentOS
Private report: No CVE-ID: None
 [2015-03-02 15:09 UTC] seb at rootsandrain dot com
After upgrading from 5.5.22 to 5.6.6 the script failed to operate correctly, churning out "Notice: undefined variable" errors on the function call line.

Disabling opcache fixes the problem.

Sadly the short version I've posted here doesn't appear to exhibit the problem, and I don't have time to anonymise the much larger section of code that's been breaking.

Nevertheless, it was 100% the call to "myFunction" that was giving a Notice undefined variable error.

Test script:
${"sR{$i}S1"} = 'hello';
${"nR{$i}S1P"} = 'world';

myFunction(${"sR{$i}S1"}, ${"nR{$i}S1P"});

function myFunction($x, $y) {
    echo "$x $y";

Expected result:

"hello world"

Actual result:
Notice: undefined variable


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-04 06:19 UTC]
-Assigned To: +Assigned To: laruence
 [2015-03-04 06:49 UTC]
Automatic comment on behalf of laruence
Log: Fixed bug #69159 (Opcache causes problem when passing a variable variable to a function)
 [2015-03-04 06:49 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 15:01:28 2024 UTC