Php

Why does Jow Forums hate php?

Attached: 8148dc13.png (2000x1060, 149K)

Other urls found in this thread:

techempower.com/benchmarks/#section=data-r15&hw=ph&test=db)
anvil.works/blog/one-yc-startup-a-day
news.ycombinator.com/item?id=16728706
youtube.com/watch?v=5buJAAa_AX4
twitter.com/NSFWRedditVideo

I don't.
Kinda lets you write dynamic webpages in... well "almost C".

cuz it's php

I don't, but it's incredibly boring

Thank you. What else?
I am not experimented in web development but I think that php is the most practical language to create dynamic website.
What do you mean by 'boring'?

They haven't used it and they have fallen for the HURR DURR PHP MAKE MUH HED HURT meme.

I used to have a full time PHP job for 4 years due to lack of alternatives in my area and my unwillingness to move.

It has certain limitations (your web applications are strictly scoped to an http request and nothing lives past it without really bad hacks) and invites developers to do weird things (some Symfony librsries put a ton of business logic into annotations, annotations don't exist, they're literally source code comments. If you remove a comment, the code won't run anymore). But with types, they're going in the right direction. There's worlds of difference between PHP5 and PHP7.

Please note that PHP jobs are career killers. After 4 years of PHP/Syfomy it was really difficult for me to find a better job because technical recruiters start seeing you as "a PHP guy" with all negative memes linked to it.

You have 4 years of Symfony experience and didn't realize that you can write out Doctrine annotations as code? You don't have to use annotations, it just makes saves you time writing less code.

>Please note that PHP jobs are career killers. After 4 years of PHP/Syfomy it was really difficult for me to find a better job because technical recruiters start seeing you as "a PHP guy" with all negative memes linked to it.
I'm not surprised. Despite all the hate it gets here, working with Java is definitely a career booster. Same with C#.

it's cool. we could have gotten by with only php and html5 if javascript were banned/not invented. it's the way the internet should work.
send request -> get page. simple

There's nothing wrong with coding in that manner if it gets you the desired end result.

1. It's a thoroughly repulsive language. I've written a lot of shit in a lot of languages and PHP wins the WTFs/minute competition by far
2. It's worse than all the alternatives, in every way, including ease of learning, ease of use and out-of-the-box security.
3. The community is the absolute worst. I'd even take the Ruby chucklefucks over PHP's legion of cargo cultists and incompetents.
4. There is literally zero reason to choose PHP over Python or Java.

If you're not "experimented" in web development, what the fuck makes you think PHP is the "most practical" language?

I never saw java websites but I keep in mind this alternative.

>If you're not "experimented" in web development, what the fuck makes you think PHP is the "most practical" language?
Because PHP is the language the most used for web development, and also because it was created specifically for this purpose.

It's not only doctrine, millions of packages use the annotation reader of doctrine without providing fallbacks.

What is your current main language and did you ever regret switching?

Currently I'm working in a .NET position for a local amazon-like company (Amazon doesn't exist in my country). Honestly I personally don't like any tech that I've used professionally so far. But, I'm definitely past anything that a PHP position would pay. Also, I feel more confident about finding a job abroad now with a more respected language, in case I ever decide to leave.

>Because PHP is the language the most used for web development
not for new projects, for the amount of legacy code it wiins hands down

>and also because it was created specifically for this purpose
it was originally created as a bunch of shell scripts and then got converted into a programming language later

I think most of it has to do with how many normies out there just throw up WordPress sites and call it a day. There is truly nothing worse than trying to debug poorly maintained PHP written in PajeetScript

>I never saw java websites
>what is Gmail
>what is Twitter
Java and its cousin C# (see StackOverflow, Bing, etc.) are the usual choices when you need to build something that scales, without having to throw absurd amounts of money and effort at it.

>PHP is the language the most used for web development
Inertia. It was the only real choice back in the early 2000s, so MediaWiki and Wordpress were written in it. Everyone with an ounce of sanity moved on somewhere between 2005 and 2010.

>it was created specifically for this purpose
Yeah, it was created as a templating language. Have you ever stopped for a moment to think about what that means? You realize most PHP developers use Twig for a fucking reason, right?
It was definitely not intended for building backends, which is what everyone uses it for. If you want something built specifically for that, use Go. (Or anything else, because it doesn't matter.)

PHP Dev here (2 years exp professionally, 1 year some shit with uni friends), however I am 26 and wondering if it's worth it to change to C#/Java, or should I just stick to becoming a Senior PHP and being full on PHP.

I like the language and it's currently a lot more mature and getting better. However, most colleagues are fucking idiots, as they are the "typical php developer" .

Eastern Europe if it's makes a difference.

Go for C#. Don't let yourself get railroaded into an entire career of PHP maintenance.

Go for Java. Don't let yourself get railroaded into an entire career of PHP maintenance. Java is faster than c# (techempower.com/benchmarks/#section=data-r15&hw=ph&test=db) and has the better jobs, such as realtime analytics

>what is laravel

Why did you pick up PHP and decide to pursue it professionally in the first place?

Lack of alternatives in my area

Similar situation here, 2 years of PHP work experience (and a year long internship before that), no degree, living in Switzerland.

My project are either amazon-like monolithic monstrosities or boring ass rest APIs for mobile apps.

How can I get in to big Swiss banks to make easy money? I heard they like meme Java certificates.

Where there is money there is also Java.

>no degree
I have some bad news.

>something inside a comment ever being used during execution

Complete fucking garbage babby's first framework bullshit.

What's so bad about Laravel? Coming from CodeIgniter it's like a godsend.

>Have degree with highest grade
>Also love programming in spare time
I didn't know how much people like me are gold dust to these companies. Do people just take cs degrees for the "ez money"?

The language is broken. Many functions do unexpected and dangerous things when invoked incorrectly and merely give errors.
Then there are the many, many inconsistencies.
Then there's the thing where using it as a templating language usually leaves you vulnerable to XSS, because LEL what is auto escaping.
Then there's the fucking community. Holy fuck. What a bunch of fucking retards, holy shit.

>merely give errors
I mean, that's precisely what they DON'T do. They give warnings and continue.
Fucked up bullshit.

Where in Switzerland? Zürich user here, I worked four years in PHP with no degree and then started at Digitec

NOTHING IS MORE HATED THAN JAVASCRIPT

PS
PERL > PHP

Code igniter is complete shit anyway. It's not even proper MVC with proper SoC. But the problem with Laravel is that most people start off there because it's easy, and when you learn Laravel, you don't learn the underlying PHP very well, you learn the Laravel equivalents. Not to mention how fucking smug these assholes are about Laravel. Every fucking problem starts to look like a nail when Laravel is their hammer.

When we needed to hire a guy at my last job, I interviewed a guy with 2 years of Laravel experience. This nigga couldn't even do basic array manipulation because he had become so fucking dependent on Eloquent Collections, nor could he code much of anything from scratch.

Zürich, working at one of the better web agencies at the moment.

I could get a degree, but does it really grant me more earning potential than job hopping?

Do you want to have a chat? There's a high chance you're one of my former coworkers. Join the /csg/ discord and post in #off-topic

People these days are using a shit tonne of languages which makes it a very fragile stack.

Use anvil.
>anvil.works/blog/one-yc-startup-a-day


Even YC knows it's the future.
>news.ycombinator.com/item?id=16728706

>because I don't use functions of the language it's the language's fault

Use static typing, nigga, and I guarantee that you'll get the errors that you want. Throw fucking exceptions when you don't get what you expect.

>beanstalk is a really bad hack
>databased don't exist

>this covers more than 1% of the use cases

I don't know about you, but between typed function declarations, databases, and message queues, I think nearly 100% of the bases are covered.

We don't use Eloquent (maybe we suck at it), so we just use the QueryBuilder, however it has made me google sql syntax when needing to write a query manually somewhere.

Collections are nice and easy to work with, however most of their functions are just wrappers or nothing that an array_map can't do.

What do you use instead of Laravel? Symphony?

You can't execute code past the request is over and keep the context. You need redis / jobs or 1 minute delay and cronjobs.

I'm actually one of the original authors of Phalcon. It's a kitchen sink MVC, but you can't be a muppet. You gotta know PHP first. I have used it with great success professionally as well. Everyone seems to think that speed is literally the only advantage it has, which is a huge advantage, I mean, a full Phalcon MVC app is several times faster than a Lumen Micro app, but I just like the syntax of everything because it feels more natural to me, but as I said, I was using PHP long before I was using Phalcon.

>his application isn't stateless
>laughinggirls.gif.webm

I don't know if it would fall under your definition of a terrible hack, but you can absolutely return a response, flush the output buffer, and continue processing.

I only ever use models for standard CROD ops using ID's, beyond that, I always use a query builder or in the edgiest of edge cases a raw query executed via PDO with bound parameters.

Are you serious?

Damn, this is pretty awesome, so do you still remain a PHP dev and do you think it's worth going "all in" in PHP after all? I really like the language, but not sure how my job security will be in 10 years or so.

fbpb.

PHP is written in C and is just an abstraction (a very well written one since PHP 7) to write web apps in a very efficient way.
You just don't use a showel to nail.
Node.js is, IMHO, way behind in terms of efficiency and ease of use.

> There's worlds of difference between PHP5 and PHP7.
It's right.


But just let the jobless who got meme'd in the magpie dev be mad about it I guess.

Attached: 1521108601033.png (650x650, 10K)

>JOB SECURITY
>10 YEARS

SKYNET IS TAKING OVER IN 5, DONT WORRY BOUT IT HUMAN

Attached: 1516546792622.jpg (3000x3000, 225K)

t . guy who never tried PHP

Attached: 1522383305344.jpg (889x1024, 128K)

Because geocities and such didn't allow it.

Because later hosting sites were filled with shitty php sites.

Because now PHP is popular.

Not bad, but bloated compared to other frameworks like Symfony or Phalcon

Attached: 1522426575965.jpg (684x944, 132K)

I'm getting on 40, I know enough about good application design in general to pick up just about any language and run with it, but being a god tier PHP guy has never been a hindrance. Companies who need a legacy app rearchitected but don't want to jettison their entire dev team and adopt a new language, come to me. I do a ton of consulting work and I usually get paid whether I write code or not.

I can tell you this. PHP isn't going anywhere. It still powers better than 80% of the websites where the server side language is known. And forget all the memes, and all the bullshit, there is nothing wrong with PHP. You can write bad code in any language. While I'll concede that PHP will give you more than enough rope to hang yourself with, you can write simple, elegant, bulletproof code with PHP just like you can any other language.

Obviously, I'm biased toward Phalcon. But you should try writing some stuff in it. The downside is that being an extension you have to have shell and admin access to server to install it, but with docker you should at least be able to play around. And I promise you, you will come out a better developer on the other side. Phalcon was designed to be a framework that gets out of your way. You could install it and literally only use one part of it without any problems. And you won't have to import 600 files to use it either.

I'm rambling and I could go on for days, but I'll leave you with this: While PHP is never going to win you a dick measuring contest, you get really fucking good at it and I promise you'll never hurt for work.

>N O A S S

HAS PLANKING GONE TOO FAR

'Sup Phalcon Bro?

Some popular websites use C++:
>wikipedia: programming languages used in most popular websites
This language is good for website development?

Thanks man, it's really nice to hear from someone on the top side of things! Really appreciate it!

Was thinking of checking Phalcon a bit with small stuff, but I think I will do my trading bot with it and see how it goes. Used to work at a web hosting company as a server support, so managing my dev stack is easy.

Cheers, again!

Cheers, mate. I'm just happy to have a conversation on Jow Forums that isn't the linguistic equivalent of two monkeys flinging shit over a fence.

Home pages should never be personal

>2001 + 17
>still has to poll
>SPA doesn't exist

Syntax inconsistency
Also snake_case

snake_case_is_far_more_readable_than CamelCaseInMyHumbleOpinionThbFamDesu

Attached: satirical-illustrations-polish-pawel-kuczynski-14-5abb45df32c0a-605.jpg (605x875, 111K)

SPA are bloated and cancerous.

Attached: 4skcofasa1p01.png (1452x2208, 843K)

0!=="0"
//true
can you describe the problem you are struggling to solve by comparing strings to empty arrays maybe we can direct you to a mental illness counselor?

it's literally pure garbage that started as garbage. not sure how the flying fuck anyone can be so dumb that they would ask a question as retarded as
>why does x hate php?
the better question is more like, why doesn't anyone hate php?

It's PascalCase

JS is just a fucked up langage by design.

Attached: 5abb56d7f18be-1743645-786267201401861-120219444-n-605.jpg (605x723, 91K)

It exposes them. It's easy to write bad code on php, then they blame the language for their own mediocrity.

/thread

why_Not_Both

True, but you need to know PHP quirks to write good code.
I'll be soon programming again with PHP, I sure hope that with 7 things have become better.

PHP 7 is like a different language. Problem is, new coding practices are optional, so plebs can still write complete fucking garbage.

It's hard to write good, secure PHP code.
It's easy to write good, secure Python code.
Gee, I wonder what I should use.

So many of PHP's built in libraries either fail to do things implicitly when you'd expect them to, or do things implicitly when you'd expect them not to. Its also very hard to write code that doesn't cause strange side effects with other code previously written without a strict framework and application model because of how the language itself is designed. Its a templating engine turned general purpose web programming language, so its unavoidable. That said, you can write good code free of these issues, but its not enough to just follow PHP docs. Experience is the only way to stay away from these pitfalls

1. Node outperforms the PHP/Apache stack by far
2. PHP is a very inelegant language. JavaScript is also, but it is also pretty well-done. The creator of PHP openly admitted that he had no experience designing a language and it shows.

I will give you the benefit of the doubt about PHP7. But if I'm doing quick scripting I'm probably gonna choose Typescript. If I do heavy server side shit I'm probably gonna do .NET Core or Golang.

>comparing a compiled language to an interpreted one

You clearly know exactly what you're talking about.

JS6 is python with curly brackets and much better tools.

idk what a JIT compiler is.

you also have to flex your butt

php is a waste of computational resources and invites monkeys to create spaghetti web apps its much better to create REST APIs send the minimal information to the client side and be the client side the one that process the views.

>much better tools
What the fuck are you smoking, user?

Yes, I do. I'm glad you feel that way, too. PHP is primarily used for web programming, so I compared it to other web programming stacks. Go and C# happen to be compiled to a byte code. I mentioned TS/JS which is an interpreted language as a comparison of another scripting language. My point was, I see no need for PHP since Node exists and JS is a much more elegant language. ES9 with Babel and/or TS is great for prototyping or quick web scripting.

I'm sorry, but when I think of PHP I think of 2000s forum software with lots of security holes and sad WordPress devs who probably want to kill themselves.
Golang does not use a jitter.

>Golang does not use a jitter.
I am not talking about go, JS and PHP engines has just in time compiling these days.

>hard
It's not hard, you fucking dunce, it's just possible to write bad, insecure code. I'd rather be allowed to write whatever code I want than be forced into a particular paradigm.

So I should use PHP because, what, it lets me fuck up instead of forcing me to write better code? Why not just write C if you want to live on the fucking edge?

>I'd rather be allowed to write whatever code I want
Me too, dumbass. That's why I don't use PHP.

(op)
It's obviously a great conspiracy from the software industry.
How can you not see this, are you actually retarded?
>Not made by Google or Microsoft so not allowed to succeed.
>alot already built in PHP. not allowing it to be maintained "better" to build new apps in ((NOde js))

I don't. They actually learn from their mistakes here and there, which is more than what I can say from most other programming language developers.

None of his comparisons are made invalid by this distinction

I used to think PHP is for brainlets, but then I saw Bisqwit uses PHP too.

youtube.com/watch?v=5buJAAa_AX4

Attached: hmm.png (245x206, 8K)

i like php
very utility
gets sh*t done quick
enduring workhorse

Php is stored in the balls

Yes, why use open source based PHP7 when you could pay every month for the privilege of *tables*. gtfo anvil shill. Also, "people these days are using a shit tinne of languages which makes it a very fragile stack" - read that again but slowly.

What is Promises for 100$.
"Elegant"

"0" -> false
"00" -> true

Attached: php1499834837274.png (1280x720, 335K)

>People these days are using a shit tonne of languages
Get with the times, gramps. People are using JavaScript for everything: DB, server, and client.

Observables fix everything wrong with promises.

OP, just give up. If you are still asking about php, you are doomed to a life as a code monkey. phps issues are too many to list and too serious for the language to be worth having a conversation over.