File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
reflection /
tests /
bug49074.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #49074 (private class static fields can be modified by using reflection)
--FILE--
<?php
class Test {
private static $data1 = 1;
private static $data4 = 4;
}
class Test2 extends Test {
private static $data2 = 2;
public static $data3 = 3;
}
$r = new ReflectionClass('Test2');
$m = $r->getStaticProperties();
$m['data1'] = 100;
$m['data2'] = 200;
$m['data3'] = 300;
$m['data4'] = 400;
var_dump($r->getStaticProperties());
?>
--EXPECT--
array(2) {
["data2"]=>
int(2)
["data3"]=>
int(3)
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>