-
Notifications
You must be signed in to change notification settings - Fork 327
Values stored in Memcached influence variables defined in PHP #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have similar issue with latest commit in php7 branch 52c644b via dotdeb https://github.com/gplessis/dotdeb-php-memcached/releases/tag/upstream%2F2.2.0-2-52c644b I cannot reproduce with a test script yet but the issue is causing unexpected userland variable behavior:
I can confirmed last dotdeb release has no such issue. |
I am not able to reproduce this issue with the latest 7.0, or 7.1. Can anyone else? |
Sadly I am unable to reproduce in non-production environment and do not have time to test latest |
I have the same issue: class Test
{
public function __construct()
{
$memcached = new \Memcached();
$memcached->set('key', 'whatever');
}
public function wtf()
{
$whatever = 'tests';
function () use ($whatever) {
return $whatever;
};
}
}
(new Test())->wtf(); When executing this file from cli, i get
|
Another test case : <?php
(new Memcached)->set("key", "a");
$test = create_function('', '$a = 10; return $a;');
var_dump($test()); // NULL
// PHP Notice: Undefined variable: a in [...]/test.php(6) : runtime-created function on line 1
$test = create_function('', '$b = 10; return $b;');
var_dump($test()); // int(10)
|
Hello!
I have two files:
set('key','arbitrary_variable_name',0); include_once('b.php'); b(); ?>When I try to run it under CLI, I get error:
[root@s6 q]# php a.php
PHP Notice: Undefined variable: arbitrary_variable_name in /home/wl/.htprivate/options/q/b.php on line 7
array(1) {
[0]=>
NULL
}
Error does not occur if I change name of the variable, or value stored in Memcached.
PHP 7.0.3 (cli) (built: Feb 4 2016 08:51:10) ( NTS )
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
libmemcached-1.0.18
Memcached extension sources are downloaded from php7 branch.
The text was updated successfully, but these errors were encountered: