Bug #72615 [Com]: Method __call is triggered instead of an existing method

From: Date: Mon, 18 Jul 2016 10:09:55 +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-202392@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 Block user comment: N Private report: N New Comment: 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). Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#202392) next »