Bug #72615 [Fbk]: Method __call is triggered instead of an existing method
| From: | cmb@php.net | Date: | Mon, 18 Jul 2016 15:58:06 +0000 |
| Subject: | Bug #72615 [Fbk]: Method __call is triggered instead of an existing method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202401@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72615&edit=1
ID: 72615
Updated by: cmb@php.net
Reported by: madboy at gmail dot com
Summary: Method __call is triggered instead of an existing
method
Status: Feedback
Type: Bug
-Package: Class/Object related
+Package: opcache
Operating System: Ubuntu 14.04
PHP Version: 5.6.23
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
New Comment:
Thanks for the fast feedback!
Previous Comments:
------------------------------------------------------------------------
[2016-07-18 15:30:14] madboy at gmail dot com
I did have opcache enabled by default.
After I disabled it, I get an expected result from code snippet reported.
I tried this code on PHP 5.5 and 7.0.8 and it worked fine with default settings. Though I don
t
know if I had cache enabled and I dont have those docker containers right now.
------------------------------------------------------------------------
[2016-07-18 13:52:51] cmb@php.net
Is OPcache (or another bytecode cache) involved when you run on
Apache?
------------------------------------------------------------------------
[2016-07-18 10:09:54] madboy at gmail dot com
if I run this code from command line it works fine.
I get this problem only if I execute it through Apache (haven`t tried any other methods).
------------------------------------------------------------------------
[2016-07-18 09:25:00] requinix@php.net
Working fine for me. https://3v4l.org/NKfA4
------------------------------------------------------------------------
[2016-07-18 08:08:46] madboy at gmail dot com
Description:
------------
Method __call is triggered instead of an existing method
Test script:
---------------
class A
{
const METHOD = 'test';
public function test()
{ echo 'test'; }
public function __call($a, $b)
{ echo '__call'; }
public function start()
{ $this->{self::METHOD}(); }
}
$obj = new A();
$obj->start();
Expected result:
----------------
a string "test"
Actual result:
--------------
a string "__call"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72615&edit=1