Compiling PHP's Eval() to .NET
peachpie.io
Compiling PHP's Eval() to .NET
1–10 of 11 posts
Re: Compiling PHP's Eval() to .NET
#2Glad to see Roslyn has made PeachPIE even more capable.
Re: Compiling PHP's Eval() to .NET
#3This works because we are mostly interested in equality of strings and other computation with strings (mostly prefix based classific) is done ahead of time.
For debugging we emit our generated code and both eclipse and intellij picked up our generated code without configuration. It's safed us a lot of headaches.
Re: Compiling PHP's Eval() to .NET
#4Re: Compiling PHP's Eval() to .NET
#5I needed the ability to safely execute formulas in my .NET app. My solution was to write a parser and interpreter. Here it is: https://github.com/Rajeev-K/formula-parser
Re: Compiling PHP's Eval() to .NET
#6I needed the ability to safely execute formulas in my .NET app. My solution was to write a parser and interpreter. Here it is: https://github.com/Rajeev-K/formula-parser
Re: Compiling PHP's Eval() to .NET
#7Re: Compiling PHP's Eval() to .NET
#8I needed the ability to safely execute formulas in my .NET app. My solution was to write a parser and interpreter. Here it is: https://github.com/Rajeev-K/formula-parser
Also, how would one execute said formula?
Re: Compiling PHP's Eval() to .NET
#9I needed the ability to safely execute formulas in my .NET app. My solution was to write a parser and interpreter. Here it is: https://github.com/Rajeev-K/formula-parser
You can do this already with DataTables, which is basically an in-memory Excel spreadsheet. Bonus is that it also supports Excel functions, and it’s completely safe/sandboxed code.
Re: Compiling PHP's Eval() to .NET
#10This will not correctly handle the case when the user attaches a debugger after the eval has started, but before all execution artifacts (including callbacks/closures) are finished.