> De : Pierre Joye [mailto:pierre....@gmail.com]
>
> > We solved some of the other problems by only allowing definitions, no
> side-effects - classes, constants, namespaces etc. We do not allow code
> outside of a function body here.
> 
> Yes, we will have to do that, no matter what we choose. I am however
> not sure how to do it with the current engine design. Using
> zend_compile (or a derived implementation) may help.

Is there a technical problem with code located outside of definitions, or is it 
just a convention (PSR already contains this rule) ? I understand the problems 
it poses in HHVM, but I don't see why we should check that with the engine as 
it is structured now. Even if we can detect such questionable usage (and we can 
detect it quite easily just using tokenizer output), IMO, we are not 
responsible of what developers put in their scripts.

Regards,

François


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to