5 ms·
Here to see how many comments don't bother reading the piece and just react to the title.
by smacktoward 6y ago
Here to see how many comments don't bother reading the piece and just react to the title.
- njharman 6y agoI didn't, skimmed. > PHP is the most widely used language in the world for websites. Being served does not equate to being used to develop new things. Is there really that many new websites, website features being authored in PHP? Sure there is maintenance work and some popular platforms are written in it. But beyond that? I haven't seen a job posting in long time.
- ceejayoz 6y agoThere are plenty of job postings. They just mostly say stuff like "Laravel" instead of "PHP".
- tyingq 6y agoIt consistently makes the list for any analysis of "top X languages by job posting" I can find.
- teen 6y agoI'm using it at a fresh start up. Having used node, internal Google frameworks, python, and dart previously, I would highly recommend PHP for new projects. Laravel is what makes it worth it imo.
- artificial 6y agoLaravel is pretty sweet, I recently scoped it out (been in Flask land and itching to try some Elixir/Phoenix) and it's got everything, exploring the queues now. I really like the helpers for accessing array elements through dot notation. Example: $data = [ 'more' => [ 'complex' => ['my value'] ] ]; if (array_key_exists('more', $data) && array_key_exists('complex', $data['more']) && array_key_exists(0, $data['more']['complex'])) { echo $data['more']['complex'][0]; } You can do this: echo Arr::get($data, 'more.complex.0'); Plus the bog standard php null coalescing operator "??" is pretty sweet. // fetch the value of $_GET['user'] and returns 'not passed' // if username is not passed $username = $_GET['username'] ?? 'not passed'; Just some little things off the top of my head. *Formatting.
- anko 6y agoArr::get($data, 'more.complex.0'); is much nicer, I agree. I do think better languages do it better, for example in Elixir I can extract multiple elements out of an object at the same time. object = %{nested: ["my value"], other: "some element"} %{nested: [first | _], other: other} = object first now equals "my value" and other now equals "some element". PHP sucks because of the legacy it pulls with it that keeps it from being simple and elegant. It also fails pretty hard when you use it outside of it's niche, and a multi-purpose language > single purpose language.
- artificial 6y agoYeah, still just checking it out, getting an auth system working with oAuth in about 15 mins via Socialite was fun. I want to test out the Lambda deployment which seems sweet. I use Serverless for that ATM with JS and Python. Elixir pattern matching is fantastic and I miss being able to call functions by arity. I don't know which deployment process I prefer, yet. They all suck.
- smacktoward 6y agoI don't understand this response. You are proud you didn't read the article? Does it add any value to the conversation to just pull out one sentence and react to it out of context? The only thing I can think of is that HN rewards early responses with more karma, so people feel a need to rush past the "reading" and "thinking" parts and just skip to the "responding" part to rack up more internet points. Perhaps HN should look into ways to rework things to reduce or remove that incentive.
- dariusj18 6y agoMy company has switched to using it. The 7.x versions have really made PHP a much better experience. I still hate the inconsistent method names.