2018-02-14 12:40 GMT-03:00 Michael Morris <tendo...@gmail.com>: > Assert is a statement in PHP 7. Try this code > > function foo() { > debug_print_backtrace(); > return true; > } > > assert(foo()); > > In PHP 7 only foo() will be in the backtrace. In PHP 5 assert will be > listed as well. >
I saw all that `PHP_FUNCTION` and `ZEND_PARSE_PARAMETERS` so thought that was just a regular exposed function with compilation toggled by setting. Anyway doing it directly in the lexer would avoid the argument parsing step (and turning parentesis optional). 2018-02-14 13:29 GMT-03:00 Niklas Keller <m...@kelunik.com>: > > I don't think that's true. 0 can be used to dynamically switch > assertions on and off, which can be useful in some applications. > This can be useful for testing frameworks which does contract programming by assertions but only in development. Atenciosamente, Pedro