--TEST-- Enum properties cannot be written to through reference in foreach --FILE-- value) {} } catch (Error $e) { echo $e->getMessage() . "\n"; } var_dump(Foo::Bar->value); ?> --EXPECT-- Cannot modify readonly property Foo::$value int(0)