Live data from Hacker News

PHP in 2019

stitcher.io

371–380 of 489 posts

Re: PHP in 2019

#371

Earlier quoted context omitted.

That's irrelevant. When talking about language consistency, we should also be including the language's standard library. The problem is that PHP wasn't designed as language-first but as a tool to make web development more accessible. Hence the acronym for "Personal HomePage". PHP was merely a native interface to modules written in C (e.g. MySQL), with the interface hosted in a simplified version of Perl. The draw of…

> That's irrelevant. When talking about language consistency, we should also be including the language's standard library. As you said, PHP was merely an interface to (many already existing) modules written in C. When people complain about mysql_real_escape_string() in PHP they don't realize that that is the actual name of the function in the MySQL C API. Same with the image functions (imagemagik). And so on. Some ar…

Genuine question, because I do not know the answer. Does it support:

Lexical scoping

Coroutines

Generators

Decorators

Generic type containers

A functional API (e.g. something like Java 8 streams)

An extensive selection of data structures (collections) included in the standard lib

?

Re: PHP in 2019

#372
post #343

Earlier quoted context omitted.

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…

The command line tool for Laravel is named 'artisan'. You use it to do everything in Laravel, from setting up controllers/views to seeding databases.

I guess "Laravel - The PHP Framework For Web Scaffolders" wasn't catchy enough.

Re: PHP in 2019

#373

Earlier quoted context omitted.

> it is built around static methods instead of proper OOP The fake case against Laravel that never dies . The truth is found in the docs: https://laravel.com/docs/5.8/facades > Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to u…

What isn't fake is that Laravel uses magic methods everywhere, especially in the ORM layer. There are way too many magic things happening under the hood for my taste.

Magic methods in PHP are very commonly used to help reduce code verbosity - having come from working mostly in C++ I appreciate being able to express things succinctly.

Re: PHP in 2019

#374
post #323

Earlier quoted context omitted.

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.

Would you use a pear dependency in a new project if you weren't pulling bits in from an older one?

Personally, I wouldn't... I worked with pear and pecl and composer is just far more pleasant to interact with.

Re: PHP in 2019

#375
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…

Laravel is interesting for greenfield stuff. I'm working on a legacy project and we've had a bunch of good times with zend as it allows you to transition to it more naturally piece-by-piece.

Re: PHP in 2019

#376

Earlier quoted context omitted.

> (PHP devs memorize the common functions.. Nope (c) Me, after 5 years on trying to but still falling back to googling every 20 minutes despite years and years of using the language. ... And just writing code without looking into docs much after a week with ruby

I'm quite shocked that a common complaint of any language is function syntax. Maybe it's been awhile since I've used PHP, but is it really worse than any other language? The problem with PHP is that, at least years ago, it had no equivalent of C's man pages. In C, you're constantly doing "man memchr" or what have you. Perl has "perldoc -f sort". Don't get me started on Ruby, though. Wading through a tower of classes…

What are you talking about? I have been using php.net/{funcname} since forever.

Re: PHP in 2019

#377

Earlier quoted context omitted.

The thing that I like about PHP is that I can mix HTML, code, and database queries into a single file. This is incredibly useful when learning basic web development, even though it doesn't scale for more complicated applications. It's also incredibly useful when trying to bang out a simple experiment.

And many of us took the jump and refused to do things that way. You're wrong, PHP scales and you CAN do separation of concerns and have pretty, maintanable code, using a framework or not: just a matter of knowing what you are doing

I think you're missing the point of the comment - when it comes to prototyping PHP is incredibly easy to whip out a buggy test thingy in minutes that breaks all best practices but still lets you prove a concept or prep a demo.

Re: PHP in 2019

#378

Earlier quoted context omitted.

You make a sweeping statement about a bubble and then demonstrate the edge of yours: > The business world runs on Java, and .NET to a lesser extent. Flip those. > I just don't see any recruiter activity around PHP at all. This is probably true. My own anecdote: I'm at a primarily-PHP SaaS provider in a major tech hub, and for the couple hires we've made in the last year all of our applicants with extensive PHP experi…

> Flip those. Nope. That's just incorrect. From Experian to JPMorgan Chase to Cambia Health to Amazon, Java is the typical case for every project. Look at stream processing tools at netflix via any given youtube presentation about stream processing. There are entire tooling segments where .NET is absent, despite their quality tools that run on Windows. Nobody trusts Windows by default and this has mortally wounded .N…

Having done a lot of .NET programming at JP Morgan Chase, allow me this Marshall McLuhan in Annie Hall moment ...

I have no idea which language is more popular, but I can certainly list 1,000+ companies including the majority of the Fortune 500 who use .NET in the enterprise.

Re: PHP in 2019

#379
post #332
post #315

Earlier quoted context omitted.

Right here! PHP and JS/TS is what I do every day. PHP has its tentacles all over the web: WordPress and Drupal are immensely popular for simplistic sites and short-lived promotionals, Magento and WooCommerce attract many e-commerce users, and Symfony/Laravel handle the custom stuff. I've worked with all of these and have the scars to show for it. All popular projects have swarms of consultants offering advice, prebui…

> [WordPress and] Drupal are immensely popular for simplistic sites That's not a sentence I expected to see. Ever. Drupal is popular for many things but for simplistic sites?

We run about 1,000 simple websites off the same Drupal codebase. Custom forms, page layouts, etc.

Re: PHP in 2019

#380
post #325

Earlier quoted context omitted.

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…

It's funny, I remember when I started working on my first PHP framework, I knew about Drupal, CodeIgniter, Kohana, Symfony and Ruby on Rails. Back then, Symfony was the Ruby on Rails applied to PHP. And I wanted to have a more "php-like" approach to everything. That's when I made phponpie.com (the early attempt). Fast forward to now. After 10 years there is https://qbix.com/platform . If you're reading this and know…

> I knew about Drupal, CodeIgniter, Kohana, Symfony and Ruby on Rails.

I was a huge fan of PyroCMS which was based on Code Igniter. I stopped using it when the all of the JS frameworks exploded. I went back last year to check on them and found out they moved to Laravel.

https://pyrocms.com/

The community since then has grown by leaps and bounds. Good to see the Pyro team still out there making a great CMS.

Post reply on HN