We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An example of this is using eval inside of eval, which produces this exception:
System.InvalidOperationException: Use of 'eval()' is discouraged. Construct allows execution of arbitrary code and is subject to performance and memory overhead. at Pchp.Core.DefaultErrorHandler.Throw(PhpError error, String message) at Peachpie.Library.Scripting.Script.<>c__DisplayClass15_0.<CreateInvalid>b__0(Context ctx, PhpArray locals, Object this, RuntimeTypeHandle self) at Peachpie.Library.Scripting.Script.Evaluate(Context ctx, PhpArray locals, Object this, RuntimeTypeHandle self) at Pchp.Core.Operators.Eval(Context ctx, PhpArray locals, Object this, RuntimeTypeHandle self, String code, String currentpath, Int32 line, Int32 column) at Mockery.Loader.EvalLoader.load(MockDefinition definition) in /home/travis/build/calvinbaart/laravel-peachpie-sample/Laravel.Tests/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php:line 34 at CallSite.Target(Closure , CallSite , PhpValue , Context , PhpValue& ) at Mockery.Container.mock(PhpValue[] args) in /home/travis/build/calvinbaart/laravel-peachpie-sample/Laravel.Tests/vendor/mockery/mockery/library/Mockery/Container.php:line 230 at <>.mock(Container , PhpValue[] ) at Mockery.mock(Context <ctx>, PhpValue[] args) at Illuminate.Tests.Foundation.FoundationProviderRepositoryTest.testManifestIsProperlyRecompiled() at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at CallSite.Target(Closure , CallSite , TestCase , NameParam`1 , Context , UnpackingParam`1 ) at PHPUnit.Framework.TestCase.runTest()
The text was updated successfully, but these errors were encountered:
works for me, seems eval() only throws exception if the evaluated code cannot be compiled (contains error), warnings are ignored.
eval()
sample:
eval ( 'eval(\'$x = 666;\');' ); echo $x;
Sorry, something went wrong.
Maybe the evaluated code contains more warnings AND an error, and just the first problem was reported, but the real error was not?
invalid eval() reports all the diagnostics (not just the first one)
256cd02
solves #502
closing, failed eval is caused by something else which is now reported properly
No branches or pull requests
An example of this is using eval inside of eval, which produces this exception:
The text was updated successfully, but these errors were encountered: