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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC