~legolas/ubuntu/natty/php5/5.3.5

« back to all changes in this revision

Viewing changes to ext/reflection/tests/bug53366.phpt

  • Committer: Stas Verberkt
  • Date: 2011-02-01 09:27:15 UTC
  • Revision ID: legolas@legolasweb.nl-20110201092715-yq052iu2yl4i2eyg
Inserted PHP 5.3.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #53366 (Reflection doesnt get dynamic property value from getProperty())
 
3
--FILE--
 
4
<?php
 
5
 
 
6
class UserClass {
 
7
}
 
8
 
 
9
$myClass = new UserClass;
 
10
$myClass->id = 1000;
 
11
 
 
12
$reflect = new ReflectionObject($myClass);
 
13
 
 
14
var_dump($reflect->getProperty('id'));
 
15
var_dump($reflect->getProperty('id')->getValue($myClass));
 
16
 
 
17
?>
 
18
--EXPECTF--
 
19
object(ReflectionProperty)#%d (2) {
 
20
  ["name"]=>
 
21
  string(2) "id"
 
22
  ["class"]=>
 
23
  string(9) "UserClass"
 
24
}
 
25
int(1000)