Annotation of embedaddon/php/tests/classes/bug23951.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #23951 (Defines not working in inherited classes)
! 3: --FILE--
! 4: <?php
! 5:
! 6: define('FOO1', 1);
! 7: define('FOO2', 2);
! 8:
! 9: class A {
! 10:
! 11: public $a_var = array(FOO1=>'foo1_value', FOO2=>'foo2_value');
! 12:
! 13: }
! 14:
! 15: class B extends A {
! 16:
! 17: public $b_var = 'foo';
! 18:
! 19: }
! 20:
! 21: $a = new A;
! 22: $b = new B;
! 23:
! 24: print_r($a);
! 25: print_r($b->a_var);
! 26: print_r($b->b_var);
! 27:
! 28: ?>
! 29: --EXPECT--
! 30: A Object
! 31: (
! 32: [a_var] => Array
! 33: (
! 34: [1] => foo1_value
! 35: [2] => foo2_value
! 36: )
! 37:
! 38: )
! 39: Array
! 40: (
! 41: [1] => foo1_value
! 42: [2] => foo2_value
! 43: )
! 44: foo
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>