Live data from Hacker News

PHP is worth learning and using

bulletproofphp.dev

141–150 of 468 posts

Re: PHP is worth learning and using

#141

The closest this post gets to supporting its thesis is this section: > You might have heard people say that PHP was "doing serverless before serverless was a thing", and this is kind of true. I believe that PHP is...not bad I guess? I'm sure it can make good things. But after reading this I have no idea why I would pick up PHP over any of the other capable tools out there.

Why would you pick any other language instead of PHP for web dev?

Is there now a reliable non-hacky way to do threads or async, to run queries to multiple dbs or backend systems simultaneously in PHP?

Re: PHP is worth learning and using

#142

The closest this post gets to supporting its thesis is this section: > You might have heard people say that PHP was "doing serverless before serverless was a thing", and this is kind of true. I believe that PHP is...not bad I guess? I'm sure it can make good things. But after reading this I have no idea why I would pick up PHP over any of the other capable tools out there.

Why would you pick any other language instead of PHP for web dev?

Because Elixir has transparent parallelism and trivially scales to 2000 reqs/second on a $5 VPS even though it's a dynamic language, oh and because it has LiveView which eliminates the need for most of the JS in a project (if latency isn't critical), so now a backender can take care of 100% of a web project.

I worked with PHP 9-10 years ago. Still not impressed to this day. Why should I use it? Terrible type coercion that can and will catch you with your pants down is my chief complaint -- that alone is enough for me to never touch it again. I want predictable tools, not something I actively have to fight against so I can get my job done. How is this even considered productive?

So tell me again, why should I use PHP? How will it truly help me? What does it do better than everyone else?

Re: PHP is worth learning and using

#144

I heard that Php is unsecure by default. Wonder what's the state of that?

There used to be bad defaults, such as "magic quotes" and "register globals".

Register globals was turned off in later versions of PHP 4. Magic quotes was turned off in PHP 7, released in 2015.

PHP today is no more "unsecure by default" than any other language.

Re: PHP is worth learning and using

#145

Earlier quoted context omitted.

Good jobs though? Lots of PHP jobs in Canada, but the salary is nearly universally always laughably low.

IDK what is a good salary in US/Canada, I live in European Union. My salary as WordPress developer is more than 4,5k USD/month and I see job offers with 8k USD as well (still for WP developers, this is my specialization and I know this field the most; I expect for better recognized PHP fields like modern frameworks like Laravel it could be more) And yes, 4,5k USD/month is massively good salary for Europe. On the othe…

I also live in the EU, and 4,5k is not a massively good salary for a programmer in my country (Denmark). This is usually what a junior is paid.

Re: PHP is worth learning and using

#146

Hey if you don't like PHP please don't use it. I 'd hate to bring the culture of tiny packages, fake compilers, transpilers and weekly trends to PHP. Personally I use php because it works well and fast and still supports my 10 year old websites, not because it's cool.

I like PHP and still use it today. But never in my life heard PHP is cool. Am I missing something?

Well, early 2000s it was definitely cool.

Using ASP and want to calculate an MD5? Oh, you need to pay an add-on for that. Want to send an email? Ditto.

Then there was PHP, with all included (and cheaper hosting, because Linux). I started working on a web shop and after a month ASP was legacy and PHP the new cool thing, together with MySQL instead of using... Access as "database" in ASP.

Re: PHP is worth learning and using

#147

Earlier quoted context omitted.

A very pragmatic reason exists: deployment is dead simple for users with very little technical skill. Deploying PHP software is as easy as subscribing to a shared web host (expensive or not, but most will make your life easy), connecting using FTP/SFTP, and extracting a ZIP file into the main directory. Some hosts even skip the last couple of steps and let you apply a template with a well-known PHP CMS to get you sta…

> Hey presto, you have a functioning web shop, business website, charity home page, or whatever other thing you want. If we're talking about simple templates to open a store or a simple landing page there are so many no-code options like Wix/Shopify/SquareSpace/Square that I don't think PHP offers any significant advantage.

I believe at least one of the options you listed is actually built with PHP (Shopify).

Re: PHP is worth learning and using

#148

Hey if you don't like PHP please don't use it. I 'd hate to bring the culture of tiny packages, fake compilers, transpilers and weekly trends to PHP. Personally I use php because it works well and fast and still supports my 10 year old websites, not because it's cool.

I like PHP and still use it today. But never in my life heard PHP is cool. Am I missing something?

They're making a rhetoric against JS style of development... Though I question what they mean by fake compilers...

Re: PHP is worth learning and using

#149
post #56
post #47

I have a few questions: - Is the "your app gets initialized and torn down for every request" true for frameworks like Laravel and Symfony? - Does this model uses OS threads? Does it uses green threads? And then a few remarks about the language: - I feel like the Go model is a way better model for server software than async. Since PHP is mostly used for server software, I feel like they shouldn't go with async. Python…

> Is the "your app gets initialized and torn down for every request" true for frameworks like Laravel and Symfony? Yes, though heavy optimization in opcode caching and JIT keeps it fast and the primary process manager today (php-fpm) generally keeps a pool of PHP processes persistent. Each request is initialized from scratch but there's no disk nor interpreter hit after the first. There are, of course, frameworks tha…

I don't agree with Symfony being inherently "very heavy". As set of framework components, you can any part you find useful, and wire to together yourself, if necessary. e.g.

https://symfony.com/doc/current/configuration/micro_kernel_t...

Many other PHP projects, such as Laravel and Drupal pick-and-choose Symfony framework components in this way.

Re: PHP is worth learning and using

#150
post #147

Earlier quoted context omitted.

> Hey presto, you have a functioning web shop, business website, charity home page, or whatever other thing you want. If we're talking about simple templates to open a store or a simple landing page there are so many no-code options like Wix/Shopify/SquareSpace/Square that I don't think PHP offers any significant advantage.

I believe at least one of the options you listed is actually built with PHP (Shopify).

Shopify is Rails actually. I think Magento and Prestashop are PHP
Post reply on HN