1--TEST--
2BackedEnum::from() reject invalid int
3--FILE--
4<?php
5
6enum Foo: int {
7    case Bar = 0;
8    case Baz = 1;
9}
10
11try {
12    var_dump(Foo::from(2));
13} catch (Error $e) {
14    echo $e->getMessage() . "\n";
15}
16
17?>
18--EXPECT--
192 is not a valid backing value for enum Foo
20