|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59791 Inconsistent warning message when enabled APC
Submitted: 2011-05-29 01:08 UTC Modified: 2012-04-13 09:39 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tszming at gmail dot com Assigned:
Status: Not a bug Package: APC (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.04.2 LTS
Private report: No CVE-ID: None
 [2011-05-29 01:08 UTC] tszming at gmail dot com
When the provided code get executed under Apache/mod_php, 
with APC enabled, only the FIRST request would result in 

Warning: The magic method __set() must have public 
visibility and cannot be static in test.php on line 5

When you request the file second time, no warning message 
appear - some how it was caught by APC and being omitted.

This Inconsistent behavior is hard to debug and wasted a lot 
of the development time. 

Reproduce code:

class Foo
     protected function __set($name, $value){}
     protected function __get($name) {}

echo "Loaded";

Expected result:
The warning message should always appear.

Actual result:
The warning message only appear in the 1st request.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-13 09:39 UTC]
-Status: Open +Status: Not a bug
 [2012-04-13 09:39 UTC]
This is due to the nature of the warning.

This kind of warnings is generated at compile time, which happens only once when 
an opcode cache is enabled (like APC).
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 23:01:28 2023 UTC