Why do people still use PHP?

Why do people still use PHP?

same reason people do a lot of things.

they sunk a lot of time into doing something or learning a certain way of doing something it's just mentally cheaper to keep kicking it down the road than spending time or hiring people to actually make it ok.

I dont think many peoole are starting new projects in php unless its wordpress, drupal, or another cms. If they are itsbprobably because they have talentrd php developers in house and that would be the easiest decision.

It's a hell of a drug.

Just like autism ㅛ 호호

Php7 is good

3 words:
la ra vel

It Integrates well with Apache and if you throw a dart at a crowded Street, you'll probably hit someone who knows how to use it which makes it easy to hire talent.

Yes, it is an Enterprise language, and yes it is a shitty language. But it works, has quick deployment, and if your engineering team isn't a bunch of pajeets/chingmings you won't fall into the traps.

Most of the web still uses a LAMP stack because it's a mature stack that isn't phased by meme of the week frameworks and technologies.

The alternative is NPM, which is just a bunch of js bullshit.

Web developers are fucking retards, so ever language they use is for retards.

The question is why shouldn't you use PHP? v7. 1 is fast as fuck and with framework and mvc its maintainable.

Also MongoDB is horrible for relational models. And all these meme devs with
>muh scalability
Probably never dealed with a situation where Postgres/MariaDB is not enough.

Sym pho ny

because it's the best server-side web language

Laravel is pretty good, I'd go so far as to say it's as good as Rails. Ruby is way more comfy than php, though. This is coming from someone who wrote hundreds of thousands of lines of php, mostly with codeigniter.

People know it
People have to maintain old shit (Im a Magento developer)
Laravel meme

because every pajeet knows how to use it and support is just one call to Bangalore away

Vay Por Wave

I learned PHP back in september. I love it. Wish I had bothered to learn it 12 years ago.

some "IT" guy i met at a bar told me php and java were the best languages to learn.

>IT guy
>qualified to comment on programming languages

>== is useless.
>== converts to numbers when possible (123 == "123foo"… although "123" != "123foo"), which means it converts to floats when possible. So large hex strings (like, say, password hashes) may occasionally compare true when they’re not. Even JavaScript doesn’t do this.
>For the same reason, "6" == " 6", "4.2" == "4.20", and "133" == "0133". But note that 133 != 0133, because 0133 is octal. But "0x10" == "16" and "1e3" == "1000"!
>=== compares values and type… except with objects, where === is only true if both operands are actually the same object! For objects, == compares both value (of every attribute) and type, which is what === does for every other type. What.

>PHP
>""""programming""""

Hello Pajeet! Did you fail your interview?

I've fallen to laravel meme. Then I've started to read the library code and face-palming a lot. Now I don't know whether I should send patches or just ditch it and use node js.

Then why don't we use python instead?

because the implementations are garbage compared to php
if they're better and able to be embedded in pages better people will enjoy it more (not memeing) it's not user friendly for web

And then you'll be using typescript that compiles to JavaScript for type safety.

Why not just use a lightweight Java framework instead and save you time and sanity?

>And then you'll be using typescript that compiles to JavaScript for type safety.
Which is good. The added bonus is that the frond end is in Angular 2.
>Why not just use a lightweight Java framework instead and save you time and sanity?
I don't think Java is lightweight as you think. I've run tests on Sis Sandra and it shows that JVM eats up at least 50% of CPU while the whole thing is running. With PHP I hope I will be able to switch to HHVM some day.

PHP 7 is good, better than python in some cases, and of course better than ruby meme. A lot of jobs.

There is nothing wrong with it
7 is ass but 5 is god tier.

This is why I love PHP desu.
You can use a string as integer and an integer as a string at any time without type-conversion. This is beautiful and I even wrote wrappers in c/c++, c# and vb to get the same effect.

because it works. it's amazing I know, outside of Sup Forums there are a lot of people who don't give a shit about "the right thing" or shit like that, just use something that gives results

this right here

custom framework with symfony components meme right here.

you mean 5.4 is better than 7 still?

Unless you know what you're doing and what you're dealing with. As it should be. Then none of that is a real issue.

>go > python > php > javascript
I compared the easiest languages only, so don't complain because I don't compare c/c++/java/scala/haskell and so on.

Because Wordpress does?

Maybe but the ecosystem is horrible. Composer is the shittiest dependency manager, almost 90% of PHP project issues is because composer didn't work as expected to install the dependencies. Furthermore it's quite slow, maybe the slowest one and even with prestisimo installed.

Php7 is quite hard to learn compared to golang or modern (without garbage prototype) javascript.

Xdebug is probably the shittiest debugger and can't compete with go or node ones. That's why every framework have their own debugging tools.

PHP is the new Delphi or ActionScript.

It's the best language for web development, which is highly mature, with the best framework (Laravel) for web development

...

The second way is better. No?

Atleast PHP doesn't appear to have a half-assed suggestion of a specification like HTML or Javashit. It's nice to have a language that runs like you would expect

you tell me
what does collect() mean? what does reduce() mean? what is $key (defined but not used)?
has the code improved significantly by using a closure? is it more readable? faster?

/thread

Is this supposed to be PHP? There's no "collect" or "reduce" function in php normally, but that code can be accomplished by
$files = ['one', 'two', 'three'];
$contents = array_reduce($files, function($acc, $file) {
return $acc.file_get_contents($file);
});
Don't know why they decided to redefine existing language features.

Because PHP7 is actually pretty decent. It's also easy and reasonably fast.

~70%+ of websites were using PHP , now its like 80%+

you tell me faggots
hate it, but its fastest backend language but how would you know since you dont care about those stuff you jobless hobbyists
>facebook use it
i guess they dont know shit

Laravel does that a lot.

if (! function_exists('collect')) {
/**
* Create a collection from the given value.
*
* @param mixed $value
* @return \Illuminate\Support\Collection
*/
function collect($value = null)
{
return new Collection($value);
}
}

And then reduce is a method of the collection class

/**
* Reduce the collection to a single value.
*
* @param callable $callback
* @param mixed $initial
* @return mixed
*/
public function reduce(callable $callback, $initial = null)
{
return array_reduce($this->items, $callback, $initial);
}

I only wish that there exist language like javascript but strongly typed as C. Or at least that PHP is strong typed

That seems kind of pointless but I can't say I hate it. "array_reduce" is a pretty fucking stupid name and PHP does that a lot. Probably a lot nicer to write in with a layer of sensible design over the normal PHP shitshow.

Typescript?

>strongly typed as C
So not?

Is it worth to learn that shit? I mean i only heared its used in angular but who the fuck cares about fancy shit memejs libraries/frameworks.
Should I care?Do jobs require it

Its not strictly defined what is weak and strong typed. But we can agree that C is fucking generally pretty much-ish fucking strong you prick

>Is it worth to learn that shit?
I don't know? Why did you ask for a language that fits specific criteria if you don't actually want to learn it and are just looking for job qualifications?

C is generally considered weakly typed. You maybe meant to say statically typed

Because its the best

>we can agree that C is fucking generally pretty much-ish fucking strong
No, we can't.

>maybe meant to say statically typed
I did. Wait why did I even say "strong" who introduced these undefined buzzwords as weak and strong? why couldnt people stay with static and dynamic definitions?

"weakly typed" and "strongly typed" used to refer to how difficult it was to get around the type system (casting, implicit coercion), but it's really easy to get confused with static/dynamic typing and people have misused it so much over the years that it's now up for debate which one it actually means.

this is why i like math ecosystem, everything is strictly defined and standardized and nobody can question the definitions unless with another strict definition

in programming , especially webdev, every fucking uneducated hipster is making new libraries and buzzwords and it grows like cancer and its so easy for them to spread their cancer and you end up with billion js libraries doing one same shit

What else am I meant to use if I want to make web apps? javascript bwahahahahahahahah

don't insult Delphi
its great language to write little native programs

PHP offers only bastard frameworks

write a better one you jobless freak

I've recently started coding php for work, simply because I wanted to go back into webdevelopment, but not back into Java again.

I kinda like it. It's so fucking easy. I can build all kinds of shit quickly without a shit ton of boilerplate crap. It allows me to do the most outrageous stuff (well, compared to what Java allows, like returning whatever the hell I want from a function). It's not beautiful at all, but I guess I just really like rolling around in dirt.

I don't I have flask and django

Do you use any framework?
I recently started learning Laravel, this shit is powerful. But i am always uncomfortable using things that I didnt wrote myself, I dont know interally what is happening , can somebody abuse it against me when I go live with my website...shit im paranoid

PHP is just so comfy

>Do you use any framework?
Not at work, but I've been playing around with Codeigniter and some other lightweight frameworks. Laravel seems to be the most popular one, but also a bit heavy for the generally simple sites (10-20 pages) I'm building right now. Experience with it won't hurt though.

>shit im paranoid
I'm paranoid the other way around. I wrote my own Authorisation/Authentication mechanism, because it had special requirements. It's not that difficult, but it's exactly the kind of thing I'd rather have done by people who seem(!) to know what they're doing. I'm not sure I know all the stuff I could overlook. All I had as support where a few articles with do's and don't. It seems to work fine though, but who knows.

I feel ya. I guess the best thing is to just learn stuff and become pro

lol grow up kiddos node.js and django are the new cool kids

Nerds generally don't like cool kids. so take your cool kids and go watch some ballgame or something.

Enjoy being shoved into a locker you dweeb

Joke is on you, I don't fit into a locker.

This. C is another example.

Also PHP is getting better: it got enforceable static typisation, object orientation and lambdas in v5 and v7. These are things which keep people using PHP.

No. It may have been a somewhat major update for PHP, but it still pales in comparison to everything else.

Php is still alive because most normies need easy to use CMSes and there aren't any serious alternatives in other languages.

Once Wordpress moves all their clientside to JS, it's possible Php will start an accelerated decline, since basically you won't need to write any php to use the WP API.

Same reason node became a thing. Everyone already knows the language and good luck getting all those age 30 - 60 programmers to retrain. Given the option tho it would be best to skip it and use something more modern and intelligently thought out such as ruby.

Combined they probrably make up 70% of available jobs.

Javascript stinks though. There's a good reason why stuff like dart, coffeescript and typescript exists. It's script on top of script hoping to patch the usability of that shit, but these extra layers also add complexity and more levels where bugs can arise. I'm still skeptical on how far this will keep going besides electron apps and client side scripting.

First one is far more readable desu.

Compactness is not the king of a readable cost base.

>Typescript
Why would they go and invent yet another language when so many already exist. Such a waste of time to learn when other options already exist.

Agreed. I was wondering too what they were trying to say with that post. As much as the empty variable initialization bothers me, the second script is just overdoing it. Maybe it's faster though, I could be convinced by that. Although I doubt it.

>Maybe it's faster though
It's not, read

Indian code monkeys love to use php.

Because that's what my employers asks of me. It works fine.