1--TEST--
2Bug #46064.2 (Exception when creating ReflectionProperty object on dynamicly created property)
3--FILE--
4<?php
5
6class foo {
7}
8
9$x = new foo;
10$x->test = 2000;
11
12
13$p = new ReflectionObject($x);
14var_dump($p->getProperty('test'));
15
16
17class bar {
18	public function __construct() {
19		$this->a = 1;
20	}
21}
22
23class test extends bar {
24	private $b = 2;
25
26	public function __construct() {
27		parent::__construct();
28
29		$p = new reflectionobject($this);
30		var_dump($h = $p->getProperty('a'));
31		var_dump($h->isDefault(), $h->isProtected(), $h->isPrivate(), $h->isPublic(), $h->isStatic());
32		var_dump($p->getProperties());
33	}
34}
35
36new test;
37
38?>
39===DONE===
40--EXPECTF--
41object(ReflectionProperty)#%d (2) {
42  ["name"]=>
43  string(4) "test"
44  ["class"]=>
45  string(3) "foo"
46}
47object(ReflectionProperty)#%d (2) {
48  ["name"]=>
49  string(1) "a"
50  ["class"]=>
51  string(4) "test"
52}
53bool(false)
54bool(false)
55bool(false)
56bool(true)
57bool(false)
58array(2) {
59  [0]=>
60  &object(ReflectionProperty)#%d (2) {
61    ["name"]=>
62    string(1) "b"
63    ["class"]=>
64    string(4) "test"
65  }
66  [1]=>
67  &object(ReflectionProperty)#%d (2) {
68    ["name"]=>
69    string(1) "a"
70    ["class"]=>
71    string(4) "test"
72  }
73}
74===DONE===