Live data from Hacker News

PHP in 2019

stitcher.io

351–360 of 489 posts

Re: PHP in 2019

#351

Earlier quoted context omitted.

You can be burned by every program language if you dont know the in and outs. It all boils down to, pick the right language for the job and more important, know the language you choose.

Saying that all programming languages are equally good is about as true as saying that all sorting algorithms are equally fast.

That i didnt say.

Re: PHP in 2019

#352
post #46

Earlier quoted context omitted.

This is my opinion. Some hints why I think PHP is not great: * property type declaration in doc-strings * bad documentation * verry verbose for a dynamic language * a lot of inconsistencies * automatically loading of classes is a hack (psr4) which doesn't support importing functions without specifying it in a global project file

As a note, typed properties are coming with 7.4.

And I welcome it. Also the shorter anonymous function syntax will improve the current situation by a good deal.

Re: PHP in 2019

#353
post #323

Earlier quoted context omitted.

I’d argue that the only “the” is one that’s distributed with it, which is PEAR. I’m not saying PEAR is used more or that it’s better, just that it’s the only one close to “default” with the language distributions.

I literally know no one who uses PEAR.

I do. I was using it back in 2003... pear/DB. I still have some code from that era that uses it.

Re: PHP in 2019

#354
post #345
post #62

Earlier quoted context omitted.

> You have some syntax to opt into a later release (e.g. doing ` imagine the exponential complexity as old behaviours need to be kept around for various levels of opting in.

The complexity still has to exist somewhere, right? By avoiding this, they're just keeping it in all the developers' heads, rather than a legacy mode in the compiler. I'm not sure that's the wrong decision, but it's not a great one, either. Too much complexity in the implementation can kill the project. Too much complexity in the language can kill a person's hope of learning it.

Many complaints are about the PHP standard libraries and not about the language itself, so you can learn the language just fine and just don't learn the old deprecated functions at all unless you hit such a function in a codebase and tehn you research it. . Is not equivalent to compare PHP+ standard library with JS core , PHP included function to read and write files, streams, databases,json,XML, run executables(if enabled), where in JS or other languages most of this functions are not standard.

Re: PHP in 2019

#355

Writing with PHP is better than ever... and getting better and better. And... you don't need too worry too much about the server, or the request lifecycle, or networking... you just write your app, in a language which is, in my opinion , going in the right direction with a stronger slant towards OOP and types. Of course it's still entirely possible to write garbage PHP code... but it's possible to write garbage in an…

My issue with modern PHP is that it's essentially becoming Java. And with the JVM and the Java ecosystem, what is the compelling reason to not just pick Java at this point? With Java you are basically writing exactly what you would be writing with PHP, except with more language features and the ability to opt into other languages on the JVM like Kotlin and Scala. The modern additions are fantastic for projects and te…

Java is killing itself at a rate of 6 months. They removed javapackager, which means the official tool to build releases is missing from the LTS version. The EE ecosystem is collapsing thanks to Oracle opposing the Eclipse Foundation, making the quest to build enterprise applications challenging due to namespace collisions and overrides, because of modularisation.

PHP is on this aspect still strong and you can still choose your weapon of choice to build whatever you want and not being hostage of a company.

The only missing part is a good private composer repository for companies who don't release source code.

Re: PHP in 2019

#356

On one hand, I do see that HN (and probably Reddit) live in a bubble. Where most of the darling languages and tools have very low use in the real-world. And where most of the languages and tooling that actually run the real-world go un-discussed, or simply dismissed, because they're boring and don't appeal to students and entry-level devs working on side projects. I realize that the perspective most rookies get from…

Isn't Facebook running on HipHop PHP? What about Zalando, one of the biggest platforms out there? They started using Magento and tuning it

Re: PHP in 2019

#357
post #142

Earlier quoted context omitted.

I'm not really sure why this comment is getting downvoted, but literally every single thing in that post still holds true.

If you read the article, it's full of notes about "this was fixed in 5.4" or whatever. A decent chunk of the remainder has been fixed in the 7.x series, and some of the remainder is slated to be solved in the (as of yet, unreleased) 8.0 version. Just scrolling through at random: > A function’s return value can’t be hinted. But of course, this has been incorrect for years . The next was fixed in 5.3, the next two be f…

I agree some of it has been fixed - but definitely not all of it, or even anywhere close. Some highlights of why I wouldn't rely on PHP in my stack:

- A fair chunk of phpsadness is still unfixed - e.g. https://bugs.php.net/bug.php?id=49664 where recursing too much producing a segfault is Not A Bug.

- PHP's release machines were compromised. Let's not worry who downloaded it. http://news.php.net/php.internals/77695

- PHP 6. There's no hope of making PHP work in Unicode, ever. It's like Python 3, except half way through, they went 'let's not even bother'.

- The rebuttal elsewhere on this thread points to the very problem in the PHP community:

>> PHP’s one unique operator is @ (actually borrowed from DOS), which silences errors.

> Yup. I find it very useful on the unlink() function which will raise an error if the file you're trying to delete doesn't exist.

That just demonstrates that unlink is broken! PHP's error handling is some horrible collection of C, C++ and just spamming stderr.

Re: PHP in 2019

#358

I'm working in a vanilla PHP codebase right now, and I see all sides - the fractal design fails and the surprising improvements to the language. I've just read up on the architecture of Laravel, and given the public opinion of it, must be a very nice framework. What strikes me most about PHP is the fundamental request/response execution model. Your execution context begins when a request is received and ends when we…

Actually you can compile PHP code and optimize it.

Re: PHP in 2019

#359

On one hand, I do see that HN (and probably Reddit) live in a bubble. Where most of the darling languages and tools have very low use in the real-world. And where most of the languages and tooling that actually run the real-world go un-discussed, or simply dismissed, because they're boring and don't appeal to students and entry-level devs working on side projects. I realize that the perspective most rookies get from…

I think the bubble has to do with purists vs pragmatists. I once joined a Java team as a front-end dev (I'm full-stack). They would do the back-end. They had done everything by the book perfectly. Following all the best practices. But the back-end wasn't doing what it needed to do by a long shot. They were stuck. Meaning I couldn't make progress. So I cooked up a simple (temporary) PHP back-end so I could easily buil…

Sounds like they needed a better back-end developer, not PHP.

Re: PHP in 2019

#360

I worked at a small PHP shop for about two years. There was a ton of legacy code that was utterly terrifying: a 13-deep nested `if` and the like, global variables, etc. I convinced my boss to let me start using Laravel. It made development worlds more sane. It made development orders of magnitude easier. Laravel does a lot for you, and they’ve thought about how to solve some tricky problems in clever ways. That being…

You forgot one thing: PHP has a far larger community and packages compared to exotic languages like Elixir. Everything is documented and there are tons of resources out there to solve a problem. It's like C++ for the web. Why does C++ still live? Community, extensively tested and adopted by large organizations. Well PHP is the same. Until big companies are out there using PHP (consider Vimeo or Flixbus or Groupon as example), because it is perfomant, it will fail to die.
Post reply on HN