News for hackers. Stuff that matters.
Re:PHP 8: Before and After by Macuyiko on Friday October 23, 2020 @05:09AM (#24867404)
I totally agree. What I'd actually welcome these days is a web "glue language" which adheres to what PHP wanted to be in the beginning (easy HTML output, one file per page, easy database querying, easy CGI interfacing), but without any OOP bolted on (C-style procedural would be fine), without any of the horrible security decisions, and with strong typing.

It would make a nice counterpoint to all OOP-style web dev languages (Django, RoR, PHP8+framework + routing logic) and all frontend-focused frameworks (React, Vue). Super-simple, super old-fashioned, but rock-stable and easy to kickstart a small website or prototype, and great for teaching (nothing is easier than "drop a index.lang" file in this directory and you have a website).

Re:PHP 8: Before and After by mtberatwork on Friday October 23, 2020 @08:15AM (#24868628)
Isn't this what PHP still is? Can't you just drop index.php into a directory?
Re:PHP 8: Before and After by mgkimsal on Friday October 23, 2020 @08:30AM (#24868746)
Was going to ask the same thing.

There's not much in PHP 5/7/8 which precludes just doing some raw db queries and including some templates.

The biggest 'drawback' might be that there's not one name-branch 'framework' which takes this approach (indeed, it's the opposite of 'framework' thinking). But if there was some project that documented/demonstrated 'best practices' for 'non-framework' projects, it might help reduce the "I need a framework because raw PHP is so messy" objections.

Re:PHP 8: Before and After by Macuyiko on Saturday October 24, 2020 @06:26PM (#24882392)
> The biggest 'drawback' might be that there's not one name-branch 'framework' which takes this approach

Exactly! That comes close to the point I wanted to make

Re:PHP 8: Before and After by Macuyiko on Saturday October 24, 2020 @06:25PM (#24882386)
It is, but also note my other points:

1 - security-safe and type-safe from the beginning 2 - none of the additional programming paradigms. PHP wants to be everything in one language. I know you can still use PHP "basics" like that, but it's not going to be easy to find tutorials etc. showing that

The main point I wanted to make was not about the index.php file. In other words, I'd like a PHP3, but a clean, safe, very well-designed one.