1--TEST--
2Class constant inheritance with mutable data
3--SKIPIF--
4<?php
5if (getenv('SKIP_PRELOAD')) die('skip preload produces additional warnings');
6?>
7--FILE--
8<?php
9
10// This would previously leak under opcache.
11class A {
12    const X = 'X' . self::Y;
13    const Y = 'Y';
14}
15interface I {
16    const X2 = 'X2' . self::Y2;
17    const Y2 = 'Y2';
18}
19eval('class B extends A implements I {}');
20var_dump(new B);
21var_dump(B::X, B::X2);
22
23// This should only produce one warning, not two.
24class X {
25    const C = 1 % 1.5;
26}
27class Y extends X {
28}
29var_dump(X::C, Y::C);
30?>
31--EXPECTF--
32object(B)#1 (0) {
33}
34string(2) "XY"
35string(4) "X2Y2"
36
37Deprecated: Implicit conversion from float 1.5 to int loses precision in %s on line %d
38int(0)
39int(0)
40