Live data from Hacker News

PHP 8: Before and After

stitcher.io

111–120 of 346 posts

Re: PHP 8: Before and After

#111

Earlier quoted context omitted.

> You can’t build websites with Java The (popular) horrors that are Symfony, Laravel, Doctrine and co were all inspired by Java Web frameworks and ORM.

Spring was first MVC framework, but Laravel in PHP and Django in Python were inspired by Ruby on Rails.

Django wasn’t inspired by Ruby on Rails. They are roughly the same age, but Django was made public a little later than Rails was.

Re: PHP 8: Before and After

#112
I don't really understand why in 2020 there's still this kind of blind hatred against this language. It often comes from horrible bad memories from previous versions or old frameworks.

Objectively, compared to other languages i've been working with it is more than OK. Despite it's lack of "style" it is easy to understand, host, tests, diagnose and it is powerfull for web applications.

I've been working on a SaaS API with Symfony now for 2 years, our metrics are good...

It is a good tool, it builds good softwares

It's essentially sinking in popularity because of bad faith and lack of hype, really sad !

Re: PHP 8: Before and After

#113

Earlier quoted context omitted.

> It's becoming kind of an Enterprise language It tried for decades to be one with Doctrine, Symonfy and co, trying to copy the worst of Java EE with every single possible design pattern implemented in these frameworks, XML configuration files and co... The problem is no generics, no private packages makes PHP OO a horrible mess compared to Java (or C#).

That's what baffles me with PHP. Instead of building on PHP's unique capabilities, they try to become more like Java. When PHP was and is quite successful as server-side language for HTML templating, rooted in embedded PHP triggered from SGMLish processing instructions in otherwise static HTML. It's only that they made such a hack job without context-dependent, HTML-aware escaping, making it a primary vector for inje…

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

#114

Seriously, enough with PHP. Can we just let it die? I worked with PHP 5.6 years ago and I hated it. Recently I worked with PHP 7. Heard about all the work that's been done on it and I was kinda excited to try it. It's still so broken. It doesn't matter if they improve performance or add new cool features. PHP is broken in ways that can't be fixed without breaking compatibility. Fork it or put it out of its pain.

Most of the bugs or spaghetti code I have to fix this days are not caused by the language, the issue is most of the time the requirements that changed or the developer was not experienced with that certain problem so he created a monster.

its like saying most of the seg fault caused is not due to use of C. Common langauge pattern / design choices made php to have bugs/ spaghetti code. At the end developer control many thing but that doesn't mean language don't have any fault.

Re: PHP 8: Before and After

#115
post #6

It's becoming kind of an Enterprise language [1]. Don't get me wrong I think PHP is getting cooler, hopefully everybody catches up and the fact that You can have a shared hosting for pennies run Your PHP code really puts it at an advantage compared to others. [1]: https://github.com/joaomilho/Enterprise

I really like the idea of different types of comments for usage with external tools.

Re: PHP 8: Before and After

#116

Can a fellow geek knowledgeable in PHP gives me a few pointers? I have inherited a 12 year old PHP app written by 2 interns. The code was written with Notepad++ (no IDE), no comments except when they copy pasted something from the internet, most variables are single letter and it's the biggest spaghetti bowl I have ever seen. To add insult to injury I have no experience with PHP (apart from peeking at this code to fi…

[deleted]

Re: PHP 8: Before and After

#118

I am not a developer, but by far most of the code I had to write in the past 5-6 years was in PHP. I see it going in a direction where it is no longer PHP, but trying to be something else it will never be (Java? C#?), so I may continue using it as long as it is backward compatible and that's it: good bye PHP, I am the same but you are not. I am not resistant to change, just the reasons I picked PHP versus something e…

Nothing is stopping you of writing PHP the "old" way, all new stuff is optional.

Re: PHP 8: Before and After

#119
post #6

It's becoming kind of an Enterprise language [1]. Don't get me wrong I think PHP is getting cooler, hopefully everybody catches up and the fact that You can have a shared hosting for pennies run Your PHP code really puts it at an advantage compared to others. [1]: https://github.com/joaomilho/Enterprise

> It's becoming kind of an Enterprise language It tried for decades to be one with Doctrine, Symonfy and co, trying to copy the worst of Java EE with every single possible design pattern implemented in these frameworks, XML configuration files and co... The problem is no generics, no private packages makes PHP OO a horrible mess compared to Java (or C#).

[deleted]

Re: PHP 8: Before and After

#120

I don't really understand why in 2020 there's still this kind of blind hatred against this language. It often comes from horrible bad memories from previous versions or old frameworks. Objectively, compared to other languages i've been working with it is more than OK. Despite it's lack of "style" it is easy to understand, host, tests, diagnose and it is powerfull for web applications. I've been working on a SaaS API…

The funny part is that all the hate they have towards PHP, pretty much most languages have similar or other problems. I say this as someone who loves languages like Go, Python but I run a SAAS business in PHP which brings in close to 7 figures ARR and employs 15+ people. All these developers shitting on PHP are basically the elitist form of "I don't do PHP so you shouldn't either because it sucks and is so much better".
Post reply on HN