File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug39721.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month 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
1: --TEST--
2: Bug #39721 (Runtime inheritance causes data corruption)
3: --FILE--
4: <?php
5: class test2 {
6: private static $instances = 0;
7: public $instance;
8:
9: public function __construct() {
10: $this->instance = ++self::$instances;
11: }
12:
13: }
14:
15: $foo = new test2();
16:
17: if (is_object($foo)) {
18: class test2_child extends test2 {
19:
20: }
21: }
22:
23: $child = new test2_child();
24:
25: echo $foo->instance . "\n";
26: echo $child->instance . "\n";
27: ?>
28: --EXPECT--
29: 1
30: 2
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>