Live data from Hacker News

Go with PHP

gowithphp.com

111–120 of 532 posts

Re: Go with PHP

#111
post #5

They’re not wrong… PHP7+ is blazing fast, has a huge library, gradual typing support, etc. If starting a new project in the space where they all “compete”, I would choose PHP7 or PHP8 with Laravel or Symfony (or maybe even WordPress) over Rails, Django and probably over NodeJS.

You lost me at WordPress haha... Ive a lot of love for WP, but I don't really get the appeal of extending it past blogging... if you're doing anything more complicated it's pretty trivial to implement blogging functions in your site.

wp's appeal is the admin/cms backend which can be used by nearly anyone. it can also be deployed nearly anywhere, easily.

Re: Go with PHP

#112
post #12

It’s cool to see PHP getting its second heyday once again. It’s currently a perfect storm of two communities starting to notice PHP. From the JavaScript side, people are comparing React with PHP, and on the bootstrapped start up side, people are talking about just using a single index.php file for your entire product without dealing with a complex tech stack as inspired by Pieter Levels.

> It’s cool to see PHP getting its second heyday once again. It’s currently a perfect storm of two communities starting to notice PHP. Really? I see no evidence that this is happening

The Frontend / server less / JS ecosystem craziness and high rate of change has left a lot of devs disenchanted.

High profile posts over bundlers, tailwind, and microservices set the scene.

A few popular people on Twitter have been talking about Laravel which has influenced other devs.

Wind is in Laravel's sails, not php's

Re: Go with PHP

#113

I see no argument at all for using Laravel over Django or Rails. PHP was always a mess. Why would I want to come back to it now on the off chance they don't screw things up again?

Exactly. array_filter and array_map, have different order of arguments. ($array, $callback) vs ($callback, $array) A small example of how inconsistent the language is from the ground up. Most people can explain their respective web servers, but I've never heard anyone even come close to what PHP/Laravel is actually "doing". Side Complaint: If you are working with Laravel Queue, it is such a hassle to reload your code…

So what's the programming language that's 100% consistent? For example Python isn't.

Re: Go with PHP

#114
post #49

Any programmers here who've used PHP to build command line tools in PHP? What is the experience like compared to, let's say Python or node.js? How good are the facilities? What are the limitations?

Very easy to do. Check out the getOpt function for argument parsing etc.

Re: Go with PHP

#115

Coming from Rails, how does Laravel compares? If you know both languages, which one would you pick? I've this hunch that there's no reason to lick Laravel over Rails, since that latter is the bees and knees for web development. Alternatively: what would you suggest someone getting into web development to learn? PHP or Ruby?

I would use the PHP Yii framework - it has generation of CRUD, controllers, models etc.. and excellent customisability.

Re: Go with PHP

#116
post #66

Why would you go with PHP+whateverframework instead of Ruby on Rails or Django? I haven't touched PHP since 5th version and I'm kind of sceptical it can offer anything RoR can't.

PHP 8 is a vast improvement over PHP 5. Also, the frameworks have become much better - I especially love the Yii framework as well as the Codeigniter framework if you are looking at a Rails replacement.

Re: Go with PHP

#117
PHP 8+ is filling-in a lot of the missing features -- type hints, attributes, named parameters, etc.

Nowadays instead of using 'string_you_have_to_remember_and_might_mistype' or abusing associative arrays as in the given code sample, you can usually get full code completion luxury with PHP without magic comments or other workarounds.

PHP 8 is still missing a few critical features such as generics and typed resource handles, and nikic left the project, but I'm still hopeful PHP 9 will deliver on those key additions.

Re: Go with PHP

#118

I used to refresh nettuts.com obsessively in high-school and Jeffrey Way's PHP content was the highlight. Sadly the site got a refresh ages ago and is nothing like it used to be. Anyway, if you're reading this thread, thanks Jeff!

I too learnt webdev with Jeffrey back in the jQuery days of 2011 - I subscribed to laracasts at the start of the year (primarly to evaluate Laravael for work) and was delighted to see that he runs the site - he's like the Bob Ross of webdev.

Re: Go with PHP

#119
post #63

Earlier quoted context omitted.

When are these ever issues? In a real life scenario

In almost any scenario? >I couldn't fit the data set in memory with PHP. But I could do it with Go. I guess this on is self-explanatory. >I couldn't do parallel computations in PHP in order to respond to an HTTP request quickly enough. But I could do it with Go. Consider the following (covers both statements above): you need to get some data from a few sources (databases etc) do some computation on each set and then…

> >I couldn't fit the data set in memory with PHP. But I could do it with Go.

when would you ever have a website serve a request, and have to use gigabytes of memory to do so?

> Consider the following (covers both statements above): you need to get some data from a few sources (databases etc) do some computation on each set and then do some sort of mapping to get the resulting set. You may want those computations to run in parallel and idealy you'd like to start mapping as soon as each computation function starts producing results.

Again, why would you ever have an HTTP server do so much work in order to serve a request?

Re: Go with PHP

#120
post #17

As a fullstack developer who has worked many, many years in the javascript hellhole, I mean ecosystem, as well as the python ecosystem and .NET; coming back to PHP the last 2 years, working essentially in Laravel and the like - I couldn't approve more of this message. Seriously, PHP is the grand father that will drive you to class and you'll never be late, the car will never smell and everything will always just be f…

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

Just 6 years ago you still were writing type hints in comments as suse annotations which was not PHP standard.

So PHP was and might still be a shitty language.

And PHP was my first language I'm fine with scripting with it but it was ugly as hell to write big code

Post reply on HN