On Thu, Feb 5, 2015 at 11:44 PM, Dmitry Stogov <dmi...@zend.com> wrote: > This is just a brainstorming, and we are not going to provide a working > solution tomorrow :) > You have enough time :) > > I don't like phpdoc approach because we have to define, parse and compile > new syntax for constraints. > Would constraint be able to call other functions? include external php > files? etc? > For me it's an overhead. We may reuse PHP syntax.
Last time we discussed annotation a syntax reusing PHP short syntax for array came up. To keep it as simple as possible and let the application deals with the contents. It sounds like a good compromise and flexible enough. A possible key point is also the ability to use them while using the same source for both 5.x and 7.x. Not sure it is technically possible but this is something to keep in mind. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php