--TEST-- Enum properties cannot be passed by-ref --FILE-- value, 1); } catch (Error $e) { echo $e->getMessage() . "\n"; } var_dump(Foo::Bar->value); ?> --EXPECT-- Cannot indirectly modify readonly property Foo::$value int(0)