|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65144 Session user-level handler method of a class can't invoke class
Submitted: 2013-06-27 08:02 UTC Modified: 2013-10-15 11:54 UTC
From: hark110 at 163 dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.3.26 OS: Fedora 18 x86_64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hark110 at 163 dot com
New email:
PHP Version: OS:


 [2013-06-27 08:02 UTC] hark110 at 163 dot com
if use method of class A for set session_set_save_handler then invoke a method B1 of the other class B, in the method B1 will can't access constant and static property of the class B, and report error:
Fatal error: Access to undeclared static property
Fatal error: Undefined class constant 

Test script:
class B {

	const D = 'test';

	private $a = 'my test';
	static $s = 'my static';

	public function p() {


class A {
	const B = 3;
	var $s = null;
	public function __construct() {
		session_set_save_handler(array($this, 'open'), array($this, 'close'), array($this, 'read'), array($this, 'write'), array($this, 'destroy'), array($this, 'gc'));
	public function open() {
		$this->s = new B;
	public function start() {
	public function close() {

	public function read() {
	public function destroy() {
	public function gc() {
	public function write() {

$obj = new A;

Expected result:
report error

Actual result:
no error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-21 17:37 UTC]
-Status: Open +Status: Feedback
 [2013-07-21 17:37 UTC]
Can't reproduce with PHP 5.4.18-dev and APC 3.1.13.

PHP 5.3 is now security fixes only. Please try a PHP 5.4 snapshot.

Duped by #65276?
 [2013-10-15 11:54 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Nov 29 18:05:52 2022 UTC