summaryrefslogtreecommitdiff
path: root/Zend/tests/bug49472.phpt
blob: e5b21fd50080292acd9ce3380037214d8bac58d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #49472 (Constants defined in Interfaces can be overridden)
--FILE--
<?php

interface ia {
    const c = 'Sea';
    const y = 2;
}

class Foo implements ia {
}

class FooBar extends Foo implements ia {
    const x = 1;
    const c = 'Ocean';

    public function show() {
        return ia::c;
    }
}

new FooBar;

?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant c from interface ia in %s on line %d