Re:The Rise of Hybrid PHP: Blending PHP with Go and Rust
by DoctorOW on Sunday August 31, 2025 @05:00AM
(#45081636)
To give an example, my main website is C#, I love it from a dev perspective and performance perspective. But I also have PHP on my personal server and will knock out PHP scripts for one off demo projects. I just ssh into my server, `vim projects/example.php` and it's instantly deployed as a link I can share.
[ Parent
| on HN ]
Re:The Rise of Hybrid PHP: Blending PHP with Go and Rust
by hu3 on Sunday August 31, 2025 @10:37AM
(#45083465)
There's `dotnet run` now. You can:
vim projects/example.cs
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.Run();
dotnet run projects/example.csNot the same as PHP I know, but it's close enough for me.
Re:The Rise of Hybrid PHP: Blending PHP with Go and Rust
by DoctorOW on Sunday August 31, 2025 @10:55AM
(#45083628)
I'm glad it works for you but I guess that doesn't really cover the use case I was talking about because I want to have a bunch of these. As an example, I threw together a quick web hook processor, data from one service reformatted to fit another. I don't really need to spin up a whole new VPS for an endpoint that'll only be hit once or twice a week, so this is the workflow for doing that on the server I already have.
PHP:
- vim projects/webhook.php
C#: - vim projects/webhook.cs
- Assign a port number
- Reconfigure Nginx/Caddy to serve that port number
- Reconfigure systemd to dotnet run projects/webhook.cs on startup