File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug33732.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 #33732 (Wrong behavior of constants in class and interface extending)
    3: --FILE--
    4: <?php
    5: interface iA {
    6:   const cA = "const of iA\n";
    7: }
    8: 
    9: class A implements iA {
   10: }
   11: 
   12: class B extends A implements iA {
   13: }
   14: 
   15: echo iA::cA;
   16: echo A::cA;
   17: echo B::cA;
   18: 
   19: 
   20: interface iA2 {
   21:     const cA = "const of iA2\n";
   22: }
   23: 
   24: interface iB2 extends iA2 {
   25: }
   26: 
   27: class A2 implements iA2 {
   28: }
   29: 
   30: class B2 extends A2 implements iA2 {
   31: }
   32: 
   33: echo iA2::cA;
   34: echo A2::cA;
   35: echo iB2::cA;
   36: echo B2::cA;
   37: ?>
   38: --EXPECT--
   39: const of iA
   40: const of iA
   41: const of iA
   42: const of iA2
   43: const of iA2
   44: const of iA2
   45: const of iA2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>