Just a thought: may be we can reuse part of PHP syntax and ask standard PHP
parser to do the work and provide AST.

<<requre(PHP_EXPRESSION)>>
<<weight(PHP_NUMBER)>>

I don't know if it's possible to implement...

Thanks. Dmitry.

On Fri, Feb 6, 2015 at 7:04 AM, Pierre Joye <pierre....@gmail.com> wrote:

> 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.
>

Reply via email to