1--TEST--
2Scalar type - default via constants - error condition
3--FILE--
4<?php
5
6const STRING_VAL = "test";
7
8function int_val(int $a = STRING_VAL): int {
9	return $a;
10}
11
12var_dump(int_val());
13
14?>
15--EXPECTF--
16Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the type int, string given, called in %s on line %d and defined in %s:%d
17Stack trace:
18#0 %s(%d): int_val()
19#1 {main}
20  thrown in %s on line %d
21