Hi Nikita,

it looks like a part of old implementation is not trivial with new AST
compiler.

previously we translated assert(condition) into assert(condition,
"assert(condition)").
actually we just captured a part of input buffer and added missing string
argument.

Is there a simple way to do the same now?

It's possible to convert AST into string using recursive pretty-printer.
It's not a simple task itself, but it may be reused for other things.

Joe, the rest (including zero-cost assert) is implemented at
https://github.com/php/php-src/pull/1088/files
9 related tests are failed for now.

Thanks. Dmitry.

On Mon, Feb 16, 2015 at 1:32 PM, Joe Watkins <pthre...@pthreads.org> wrote:

> > is there any penalty of catch-AssertionException-blocks? Are those
> eliminated in production code?
>
> Assertions should never be enabled in production code, the ability to catch
> (and enable by configuration) the exception serves the developer of the
> code during development only.
>
> The example code is bad, I'll clear this up.
>
> Cheers
> Joe
>
> On Mon, Feb 16, 2015 at 10:11 AM, Crypto Compress <
> cryptocompr...@googlemail.com> wrote:
>
> > Hi Joe,
> >
> > is there any penalty of catch-AssertionException-blocks? Are those
> > eliminated in production code?
> >
> > Thanks
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

Reply via email to