php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30131 Property behaviour when extending reflectionClass
Submitted: 2004-09-17 12:03 UTC Modified: 2004-10-20 11:42 UTC
From: D dot Kingma at jool dot nl Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2004-09-17 (dev) OS: win XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: D dot Kingma at jool dot nl
New email:
PHP Version: OS:

 

 [2004-09-17 12:03 UTC] D dot Kingma at jool dot nl
Description:
------------
When a class extends the reflectionclass the initialized values of a property are forgotton (actually not only the value but the whole property, resulting in an Notice 'undefined property')

Reproduce code:
---------------
<?php

class A extends reflectionClass{
	public $x="you";

	public function __construct(){
		echo "Hello ".$this->x;	
	}
}
new A();
?>

Expected result:
----------------
Hello you

Actual result:
--------------
Hello

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-12 09:24 UTC] php at bobsilva dot com
This is fixed in 5.1 CVS
 [2004-10-12 09:33 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip
 [2004-10-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2004-10-20 11:42 UTC] D dot Kingma at jool dot nl
Thnx for fixing!
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 24 03:01:25 2020 UTC