vanderlee / PHP-Expression

Simple and fast PHP expression parser, based on secure use of eval(). Supports both PHP 5.x long classnames and PHP 5.3 namespaces with short class names.
4 stars 0 forks source link

Support true, false, and maybe aliases for !, &&, and || #1

Open kieranmathieson opened 5 years ago

kieranmathieson commented 5 years ago

Thanks for sharing the parser. Nice work.

Could it be changed to support true and false in expressions?

Another useful thing for some use cases would to be allow not for !, and for &&, and or for ||.

vanderlee commented 5 years ago

I think I can do it in a way that doesn't break security, but since this library is in desperate need of refactoring, it may take a while.

kieranmathieson commented 5 years ago

OK. Got it mostly working with some string substitutions.

Thanks for sharing your work. It's one of the most downloaded and starred PHP expression evaluators.

Kieran

On Sat, Feb 23, 2019 at 4:07 AM Martijn van der Lee < notifications@github.com> wrote:

I think I can do it in a way that doesn't break security, but since this library is in desperate need of refactoring, it may take a while.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vanderlee/PHP-Expression/issues/1#issuecomment-466631615, or mute the thread https://github.com/notifications/unsubscribe-auth/AS9Ttkyoz7wGeqONnzEQolMr_LRk6hkLks5vQQS5gaJpZM4bIST8 .

-- Kieran Mathieson Associate Professor of Management Information Systems School of Business Administration Oakland University Rochester MI 48309 USA mathieso@oakland.edu 248-770-4062

No trees were harmed in the sending of this message, though some electrons were inconvenienced.