Сustom PHP extensions & compiling and protecting PHP code #368
Replies: 1 comment 1 reply
-
In theory, if you can statically compile your extension, you can create a binary that includes it. This isn't something I think we'll be adding to the NativePHP binaries any time soon though. Bundling the source into an extension and then compiling that into the PHP binary is quite a complex approach that couples your code to the version of PHP you use. This means you'd need to rebuild each PHP binary for each platform that you want to support every time you want to update your app. This feels like overkill to me. We've already got a working solution that will prevent your app's source code from being modified that doesn't introduce this level of complexity. As for copying source code, my argument there is: your code - in whatever form - is on an untrusted client machine, so all bets are off. If someone really wants to figure it out, they will. If this is a deal breaker, I recommend you move those parts of the code to a server that you have greater control over. |
Beta Was this translation helpful? Give feedback.
-
Hi. Would it be possible to make a feature to add custom PHP extensions?
This would allow compiling PHP code into an extension to protect it from being copied and modified
Beta Was this translation helpful? Give feedback.
All reactions