Bug #72615 [Com]: Method __call is triggered instead of an existing method
| From: | madboy at gmail dot com | Date: | Mon, 18 Jul 2016 15:30:15 +0000 |
| Subject: | Bug #72615 [Com]: Method __call is triggered instead of an existing method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202400@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
Comment by: madboy at gmail dot com
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
Operating System: Ubuntu 14.04
PHP Version: 5.6.23
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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