Together with my new co-author @timwolla we are restarting the discussion on the #[\Deprecated] attribute #PHP #RFC.

See https://wiki.php.net/rfc/deprecated_attribute and thread on internals ML.

PHP: rfc:deprecated_attribute

@beberlei @timwolla really interesting!

A suggestion that popped into my mind: would it be possible to pass a callable as a argument that would make the deprecation conditional, depending on the arguments? Something that would accept the arguments and returns a bool..

@alessandrolai @beberlei

Personally I prefer such questions being asked on the mailing list, so that all the relevant information can be collected in a centralized location for everyone to see.

As for the question itself: It would probably be *possible*, but semantics would likely be pretty questionable: What should ReflectionFunctionAbstract::isDeprecated() return? How should static analysis tools interpret the attribute? Would they need to execute arbitrary complex code?