{"action":"created","issue":{"url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/218","repository_url":"https://api.github.com/repos/peachpiecompiler/peachpie","labels_url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/218/comments","events_url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/218/events","html_url":"https://github.com/peachpiecompiler/peachpie/issues/218","id":332224022,"node_id":"MDU6SXNzdWUzMzIyMjQwMjI=","number":218,"title":"dynamic include/require problem","user":{"login":"liesauer","id":8676741,"node_id":"MDQ6VXNlcjg2NzY3NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8676741?v=4","gravatar_id":"","url":"https://api.github.com/users/liesauer","html_url":"https://github.com/liesauer","followers_url":"https://api.github.com/users/liesauer/followers","following_url":"https://api.github.com/users/liesauer/following{/other_user}","gists_url":"https://api.github.com/users/liesauer/gists{/gist_id}","starred_url":"https://api.github.com/users/liesauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liesauer/subscriptions","organizations_url":"https://api.github.com/users/liesauer/orgs","repos_url":"https://api.github.com/users/liesauer/repos","events_url":"https://api.github.com/users/liesauer/events{/privacy}","received_events_url":"https://api.github.com/users/liesauer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-14T01:56:40Z","updated_at":"2018-06-14T08:58:40Z","closed_at":null,"author_association":"NONE","body":"i am trying to dynamic load some php scripts, but it seems to be not supported require/include scripts.\r\n```csharp\r\nusing System;\r\nusing System.IO;\r\nusing Pchp.Core;\r\nusing Microsoft.Extensions.DependencyInjection;\r\n\r\nnamespace Peachpie.Test\r\n{\r\n    class Program\r\n    {\r\n        const string ScriptPath = \"index.php\";\r\n\r\n        static void Main(string[] args)\r\n        {\r\n            // bootstrapper that compiles, loads and runs our script file\r\n\r\n            var provider = Context.GlobalServices.GetService<Context.IScriptingProvider>(); // use IScriptingProvider singleton \r\n            var fullpath = Path.Combine(Directory.GetCurrentDirectory(), ScriptPath);\r\n\r\n            using (var ctx = Context.CreateConsole(string.Empty, args))\r\n            {\r\n                //\r\n                var script = provider.CreateScript(new Context.ScriptOptions()\r\n                {\r\n                    Context = ctx,\r\n                    Location = new Location(fullpath, 0, 0),\r\n                    EmitDebugInformation = true,\r\n                    IsSubmission = false,\r\n                    AdditionalReferences = new string[] {\r\n                        typeof(Library.Graphics.PhpImage).Assembly.Location,\r\n                        typeof(Library.Network.CURLFunctions).Assembly.Location\r\n                    },\r\n                }, File.ReadAllText(fullpath));\r\n\r\n                //\r\n                script.Evaluate(ctx, ctx.Globals, null);\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\nindex.php\r\n```php\r\n<?php\r\n\r\nrequire_once \"b.php\";\r\n\r\necho 'Hello';\r\n```\r\nb.php\r\n```php\r\n<?php\r\n\r\necho \"PHP!\";\r\n```\r\noutput:\r\n```\r\n<?php\r\n\r\necho \"PHP!\";\r\nHello\r\n```\r\nexpect\r\n```\r\nPHP!Hello\r\n```"},"comment":{"url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/comments/397223413","html_url":"https://github.com/peachpiecompiler/peachpie/issues/218#issuecomment-397223413","issue_url":"https://api.github.com/repos/peachpiecompiler/peachpie/issues/218","id":397223413,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzIyMzQxMw==","user":{"login":"jakubmisek","id":842150,"node_id":"MDQ6VXNlcjg0MjE1MA==","avatar_url":"https://avatars1.githubusercontent.com/u/842150?v=4","gravatar_id":"","url":"https://api.github.com/users/jakubmisek","html_url":"https://github.com/jakubmisek","followers_url":"https://api.github.com/users/jakubmisek/followers","following_url":"https://api.github.com/users/jakubmisek/following{/other_user}","gists_url":"https://api.github.com/users/jakubmisek/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubmisek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubmisek/subscriptions","organizations_url":"https://api.github.com/users/jakubmisek/orgs","repos_url":"https://api.github.com/users/jakubmisek/repos","events_url":"https://api.github.com/users/jakubmisek/events{/privacy}","received_events_url":"https://api.github.com/users/jakubmisek/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T08:58:40Z","updated_at":"2018-06-14T08:58:40Z","author_association":"MEMBER","body":"`CreateScript` API compiles given code from string. \"b.php\" is not compiled."}}
{"actor":{"display_login":"jakubmisek"}}