Is PHP a "bad" programming language?

Is PHP a "bad" programming language?

Attached: php-logo.png (722x474, 8K)

Other urls found in this thread:

en.wikipedia.org/wiki/PHP#History
axonflux.com/5-quotes-by-the-creator-of-php-rasmus-lerdorf
twitter.com/AnonBabble

Is Linux a "bad" OS?

Linux is a kernel.

Yes, but it has good perfomance with 7+.
It could become a good language if they revamped the syntax and rethinked method names properly.
Most of the bad of PHP is from legacy and bad decisions of the past.

yes but it is highly productive, you can get a lot of shit done in a small amount of time

Its good with HTML, kinda neat to say the least.
Its fast and kinda clean, sometimes they fuck up with the legacy.

Attached: 1525294823371.png (640x480, 227K)

yes definitely
t. first programmed in PHP

same. it's horrible as a first language but like other anons said most of its problems stem from past decisions

Attached: file.png (1280x720, 339K)

PHP is a language that was grown rather than designed.
en.wikipedia.org/wiki/PHP#History
I'm sure it must be useful but it ain't pretty.

he was a genius desu ,

In uni for IS degree, currently taking internet programing and the professor assigned a project in this shit. Fucking hate it.

nah. it does it's job well for what it's intended for. people give it shit because it's seen as a meme language.

Big sites like Pixiv.net employ PHP. It can't be that bad.

PHP is not bad, just stuped
Haskel is bad

Man I love PHP. It's just this mess of shit that evolved into other shit over time. It features contributions from countless individuals who had no clue what they were doing. Truly beautiful

Is great, the only problem is retards misusing, but with frameworks retards cant fuck up too much

PHP is fine now. Before 7 it was real insecure.

It used to be the worst monstrosity every devised by mankind but the galactobrains at Facebook polished it into something usable. It's quite alright these days.
I still wouldn't use it for new projects.

i end up regretting every time i use php, though cgi is also partially to blame

Yes, I've used python for CGI or just bottle for proper WSGI whenever I needed some basic bitch webapp with Apache. I can't imagine why anyone would ever pick php ever, back then or now. Its clusterfuck, the language

Node for backend, React for frontend.
EOD

Do you want to know how I know you're a shitty dev?

yes but it has evolved into decency
still, there's zero reason to start a new project today with php

> Node for backend
kek

It's pretty good but it's hard as fuck to maintain code made in PHP.
I work in a IT firm and most code I've seen in PHP is an eyesore.

yep, it's good.
>wah wah but js
and? v8 is fantastic.

I'm using react when I need to do some frontend webshit and I'm not too autistic about javascript. It's the only decent choice you have for frontend anyway.
But js for backend is retarded, there's tons of languages better suited for that.

PHP is super easy to pick up (and deploy), but a real clusterfuck. it's painful to try to write clean code in it.

Express is really easy to maintain in a team project, especially if you're write it in TS, and that's really valuable.
Write your back end in C# and chances are half of your team will have no experience with the language, and nearly no one will have experience with whatever framework is being used. Even PHP isn't so hot among new devs anymore.

Wanna chare constants between frontend and backend? Bam done.
Share some logic? Done.
Frontend needs to know how a thing works? Read the code instead of bothering another dev.
Those are just a few examples why using the same language makes sense.

Yes. The standard library is an absolute disaster full of inconstencies and broken, surprising, dangerous by default behavior - exactly the kind of thing you WOULDN'T want in the kind of language you'd run on your public facing webserver.

== Is broken by default, dynamic typing $ in front of every variable is broken, PHP is a templating engine but does NONE of the things you'd want one to do (escaping output by default, layout inheritance, separation from business logic.
What PHP calls "array" is pretty much everything EXCEPT an array. It's neither static size, nor a series of values, but rather just a hashmap. Except it acts a bit like a vector as long as its keys are all integers that strictly follow each other. Otherwise, it quietly reverts to acting like a hashmap again, which, once again, subtly breaks things. So have fun splicing values from an array.
And the new language features, my god. Look at all the stuff good languages are getting. Advanced pattern matching, properties, async/await, fearless concurrency...
The PHPtards are happy about scalar type hints, a feature C has had for like 40 years or so, except C is STILL better because it has enums and typed function pointers stuff. How pathetic is that? And the PHPtards treat it like a complete game changer. And it doesn't even do anything unless the callee puts declare(static_types=1) at the top of his file - then it eats runtime performance.

It was never meant to be a programming language. It was a cruddy templating engine for C. You were supposed to write the program in C, expose some functions from C to PHP and then only use PHP to display the values (and we already know it sucks at that). But people abused it as a programming language - despite the terrible decision Rasmus Lerdorf made early in its life.

PHP works if you know the minefield of terrible, unfixable bad design and manage to avoid it and use proper libraries, like Symfony's.
But at that point, you might just as well

exactly his point

>Painful to write clean code with
>hard to maintain
"If it was hard to write, it should be hard to read."

People think it’s bad because they’ve seen bad code written in php. Well written php is perfectly fine and performant.

To the people complaining about start new projects toh PHP, whats to use in it's place?

Go for something lean and minimal. Python + Django if you need the frills offered by frameworks like Laravel.

5 == true

It can be pretty shit if you're combining your PHP into a single file mixing PHP and HTML like a few My First PHP page tutorials do, it's quite tolerable if you keep PHP as a back-end where it belongs though.

PHP is absoluteley fine, there is nothing wrong with it. PHP gives you complete freedom to do whatever you want and if you still feel like following some sort of structure you can always resort to Laravel or Symfony.

I've built amazing stuff for clients in PHP, shit they still use to this day. Don't listen to faggots like this guy

Attached: +_c22d033762676478b0ca6f14a3e6dd8f.jpg (585x415, 55K)

i would call you a brainlet but js is unironically better than fucking php. python is better than php, fucking ruby is better and that says a loooooot.

>"If it was hard to write, it should be hard to read."
literally means nothing. this sentence has no meaning, i dont get it why boomers feel the need to talk without actually wanting to say something. just die already

Linux is a techtip, you fucking retard

>Django
ugh, django is only good for one type of webapp and its the django documentation. for literally anything else use flask(with custom mvc model implemented with sqlalchemy)

Attached: 1556752633878.png (1248x944, 1.14M)

I've been using PHP for a long time and I think I can safely assert that saying "it's absolutely fine" is complete nonsense.
It's "fine" only if you already know all the gotchas and/or use frameworks.
If you don't... boy, are you in for many wonderous surprises.
>Why returns a blank string?!?
>Why does scandir can't read this chinese filename on windows XAMPP
>Why isn't this date string getting localized?
>Why doesn't this work in production?
>Why can't I open a https curl?
>Why are the needle and haystack inverted in some methods?
etc

PHP could do with alternate improved syntax and methods, rethinked from the ground up properly, not like the current clusterfuck of patches over bandaids over patches over kludges over legacies.
They've been breaking compatibility anyway every so often, so complaining about the will to keep old code going is kinda retarded at this point. We still end up having to rewrite the broken parts.

there is literally nothing wrong with that

>It's "fine" only if you already know all the gotchas

This guy doesn't familiarize himself with his tools before he starts working. Sad.

>inb4 PHP is the only language ever to have idiosyncrasies

>incredibly, extensively documented type comparison is confusing

If you're incapable of reading the manual, don't operate the machinery.

This is true for >7

axonflux.com/5-quotes-by-the-creator-of-php-rasmus-lerdorf

There are no bad programming languages. Well, maybe ArnoldC.
There are only bad programmers.

It's like this:
Guns don't kill people, people kill people. So, there are no bad guns. Only bad people.

B-but express is phenomenal, and being able to just send JSON back and forth means making a REST backend is easy as pie and clean

You will still send JSON back and forth with other languages, dumb nigger.

it lets you get away with a lot of shit that is pretty hacky. also popular in indian so a lot of it comes back as a spagetti nightmare. and if the code needs maintenance, it will be shipped offshore and come back twisted.

>blue language bad

Attached: 1554243856325.jpg (720x546, 65K)

PHP is what Diversity and immigration is to Europe

> be rasmus
> create a language while having no real idea what he was doing
> hates programming
> knows that he's shit at it
> becomes a popular language used on servers across the globe
absolute madlad. be like rasmus.

> Rusty shitty old car crashes because steering wheel detaches
> Blames driver for not familiarizing himself with such tool
> not blaming the driver for using a shitty car

why are you angry, nazi?

how the fuck did you manage to acquire such a raped image. facebook perhaps norman?

>Why returns a blank string?!?
You can override multibyte usage in php.ini
>XAMPP
lul
>Why isn't this date string getting localized
Because it uses standard format, use libraries
>Why doesn't this work in production?
You fucked up config
>Why can't I open a https curl?
You fucked up config or/and compilation flags.
>Why are the needle and haystack inverted in some methods?
That's the only real complaint that comes from the way functions are stored intermally

>You can override multibyte usage in php.ini
Gee I wonder why that option was deprecated.

I already went through it all, man. It's like a bad joke.
I just want PHP devs to actually make an usable language, I had enough of explaining all the pitfalls to my juniors.
It shouldn't be like this.
PHP is a templating language and it doesn't even have shorthands native methods to escape attributes and html, which is the 80% of the use case.
And that fucking dot concatenation operator. All the subsequent exotic syntaxes just because they couldn't just use the fucking period... what the fuck.

Attached: Sure lets override for multibite oh wait.png (773x117, 13K)

It's trash, but with Symfony you don't want to kill yourself at least.

Tfw It's a shit language but all the jobs in my area demand experience in it

Attached: 1547625767871.jpg (836x543, 158K)

so is PHP doing the right decisions now? what's keeping the current decisions from being the future bad ones?

Is there a good learning resource for PHP? Need to learn it for work.
W3School looks dumb with dozens of echos.
Trying PHP The Right Way atm

lost.

Hahaha based