News for hackers. Stuff that matters.
Re:PHP in 2020 by oaiey on Wednesday January 22, 2020 @02:15AM (#22115342)
PHP has its appeal with a install and then run script situation. Its simplicity of lacking any "project" structure (like what node.js has with project.json and .NET has with .csproj) or more complicated setup (Python with setenv) makes the first days of teaching a lot easier. Also the 1:1 mapping of urls and files is appealing.

However, after that first days, all of them rely on package managers (PHP, Node, Python, .NET, ...), custom routing and a structured project organization. This also explicit includes PHP.

You should try .NET Core (in your scenario maybe with ASP.NET Core Razor Pages). Its setup is very easy (dotnet new webpage; dotnet run) and normal projects rarely need the package manager. The only challenge is the sub folder containing the web pages ;).

Re:PHP in 2020 by tasogare on Wednesday January 22, 2020 @03:28AM (#22115699)
I’m using mainly ASP.net Core for my projects but PHP is still simpler to get started with IMO. Microsoft’s framework does a lot of things, and a lot of magic involved which means sometime searching for hours in doc and stack. Another difficult thing is Startup.cs and all the magic middlewares whose declaration order actually matter.
Re:PHP in 2020 by oaiey on Wednesday January 22, 2020 @05:52AM (#22116352)
That is right. And I agree. ASP.NET is already a framework on top. PHP is the best choice for immediate entry without explaining millions of concepts (like routing, middlewares, http, ...).
Re:PHP in 2020 by lenlorijn on Wednesday January 22, 2020 @03:50AM (#22115795)
PHP uses composer as a package manager, which is quite simple to use and very easy to install (it's a phar archive, basically an executable zip file). And frameworks like Laravel can be installed with a single composer command. This is still very little setup to come to the same point.
Re:PHP in 2020 by oaiey on Wednesday January 22, 2020 @05:55AM (#22116367)
The problem an educator has is the time from start till first success (from early happiness but also time constraint perspective). In the first lecture.

Important programming tools like Projects, Package Manager, Routing, separate view/model, ... are a delay in that timespan. They are all worth it and in most frameworks not too complicated. But each item needs time to explain.