1--TEST--
2class constants basic tests
3--FILE--
4<?php
5
6class test {
7    const val = "string";
8    const val2 = 1;
9}
10
11var_dump(test::val);
12var_dump(test::val2);
13
14var_dump(test::val3);
15
16echo "Done\n";
17?>
18--EXPECTF--
19string(6) "string"
20int(1)
21
22Fatal error: Uncaught Error: Undefined constant test::val3 in %s:%d
23Stack trace:
24#0 {main}
25  thrown in %s on line %d
26