Live data from Hacker News

PHP in 2019

stitcher.io

401–410 of 489 posts

Re: PHP in 2019

#401

Earlier quoted context omitted.

I dunno... Their home page looks like something out of the Panera Bread playbook looking at the homepage. 'Web artisans'? Why is it 'clean' because it has an absurd amount of whitespace and comments of platitudes for the code example?

PHP frameworks crack me up. They so often claim they're "powerful." What does that mean exactly, who is that language aimed at? Then there is Laravel, why "artisans?" The word generally means pre-industrial. In my mind, that evokes devs doing edits on live code. Also, "Laravel" sounds like something to do with larvae. Then there's Drupal, which for the longest time was "community plumbing," which did match the experi…

(Can't edit. I meant the word "powerful," not the language PHP).

Re: PHP in 2019

#402
post #262

Earlier quoted context omitted.

The vast majority of people using a package manager in the PHP ecosystem are using composer. It makes sense to call it "the" package manager.

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 don't like that PEAR by default needs administrator privileges and installs packages into system directories. That's inconvenient because you might have many PHP applications, and each needs different versions of dependencies. What did PEAR developers think? That I will be working on a single app for whole life?

Installing libraries globally is inconvenient for developers. Sadly, most Linux package managers have same problem and do not allow you to install several versions of PHP or Node.

Re: PHP in 2019

#403

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…

Even the nature of server-side PHP is bad. Running the script like an executable and using opcache on better case is no good. Also it is not uncommon to upload a php shell using some crappy upload.php forgotten script... Come on, it's Personal HomePage language - you shouldn't do anything bigger than your home page in it.

Re: PHP in 2019

#404
post #18
post #15

Earlier quoted context omitted.

> Composer, the package distribution system, really needs work and is incredibly slow, but other than that—I'm really happy. It's also use abysmal amounts for RAM for some reason. I managed to use Chrome headless for my app with only 512MB, but not Composer.

How long ago was that? There were some issues if you had xdebug enabled, but AFAIK that has been fixed.

I had to raise Composer’s RAM limit last week for a fairly simple Symfony project with less than 10 extra dependencies. I had to up it from 2 to 4 gigs. PHP 7.2.8. without xdebug.

Re: PHP in 2019

#405

Earlier quoted context omitted.

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…

Except PHP is not Java, and it never can be. What is PHP's multithreading model again? Hotspot VM? NIO? I'm sure someone will chime in and cite something similar in PHP, but the comparison will be laughable in reality.

I'm not a concurrency expert (haven't had to do much high-performance stuff), but php does have coroutines like go's --if you use swoole, the performance is actually higher than node in some benchmarks and other multi-threaded / parallel programming paradigms, which comforts me to know that if I have the use case it's there, so I don't necessarily need to drop everything and pick up rust or java or go or another language w/ native concurrency models.

Not saying php is better, there's definitely reasons using rust, elixir, et al would be a better decision for scalability/etc... Just saying it isn't as far off from java, and it's getting JIT I believe in 8.0 (tentatively), whether that improves speed/proficiency is yet to be determined.

That said, I've been a laravel dev since 2013, getting a little bored, so have been branching out and toying w/ other things like clojure, elixir, rust, and node.js for backends to web/mobile apps. Though, laravel is easiest/fastest most of the time to get a project completed by myself.

Re: PHP in 2019

#406
post #308

I've been using PHP semi-regularly since the late 90s. It's been empowering and infuriating. The ecosystem is radically better than it used to be. Composer and the Packagist registry are as mature and dependable as npm, PyPI or RubyGems. (despite hours lost to my own namespace screwups). I'm also happy to see the Prettier-PHP project automating and enforcing code-style standards. For whatever reason, I often feel clu…

I hear this complaint a lot but I find those argument orders completely intuitive. You filter (1) an array with (2) a function. You map (1) a function over (2) an array. You reduce (1) an array with (2) a function. It follows exactly what I'm thinking when I type it. To reverse the orders would be, what? "Mapping an array with a function?" "Filter a function on an array?"

Why is "map an array with a function" unintuitive but "filter an array with a function" isn't?

Re: PHP in 2019

#407

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…

> what is the compelling reason to not just pick Java at this point?

Oracle.

Re: PHP in 2019

#408
post #2

I've actually been really impressed with Laravel after switching back to PHP for a few projects. Not only is the developer tooling experience some of the best I've experienced, it's just really the only framework I've ever experienced with a high quality ecosystem of tools—from Forge[1], which makes it dead-simple to deploy a Laravel app into production to things like Horizon, for managing Redis queues. A great examp…

Agreed, Laravel provides the best dev experience in the PHP world. The funny thing is that Laravel basically took the Ruby on Rails philosophy and applied it to PHP. Just looking at their site it's clear they have a very similar vision: simple, fast and fun. One can always find differences but the basic principles are the same. IMO this is great kudos to the Laravel guys, whatever language I use I always look for the…

I used both Laravel and Symfony but I ended up with the second. I didn’t like the way Laravel’s ORM has its models structured plus the Symfony PHPStorm plugin is a miracle. Your mileage may vary and this is just me but I never quite understood why people ended up loving Laravel so much vs. Symfony.

Re: PHP in 2019

#409
post #2

I've actually been really impressed with Laravel after switching back to PHP for a few projects. Not only is the developer tooling experience some of the best I've experienced, it's just really the only framework I've ever experienced with a high quality ecosystem of tools—from Forge[1], which makes it dead-simple to deploy a Laravel app into production to things like Horizon, for managing Redis queues. A great examp…

In my opinion the framework matters more than programming language. One typically doesn't need the "odd" or "fancy" features of a programming language if the framework is well designed and/or a good fit for the shop's conventions or needs.

Re: PHP in 2019

#410

Earlier quoted context omitted.

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…

It looks like Packagist has a private commercial offering: https://packagist.com/

And it even looks like the code for Packagist.org is open source, although not meant for self-hosting as there is no docs, support or BC compatibility guarantee: https://github.com/composer/packagist

Post reply on HN