Last active
March 20, 2020 23:47
-
-
Save beppe9000/f73b16c3b13841047583b6340f2e4ebb to your computer and use it in GitHub Desktop.
Minimum Complete usage of compiling a PHP script with Peachpie.NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Run the `START.BAT`file to compile the php script and run the resulting exe. | |
This is the final example from https://github.com/peachpiecompiler/peachpie/issues/708 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "\nHELLO FROM PHP !!!\n\n"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Peachpie.NET.Sdk/0.9.920"> | |
<PropertyGroup> | |
<OutputType>exe</OutputType> | |
<TargetFramework>netcoreapp3.0</TargetFramework> | |
<StartupObject>program.php</StartupObject> | |
</PropertyGroup> | |
<ItemGroup> | |
<Compile Include="**/*.php" /> | |
</ItemGroup> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet publish -c release | |
if exist .\bin\release\netcoreapp3.0\project.exe ( | |
REM Run the exe if it is there... | |
.\bin\release\netcoreapp3.0\project.exe | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment