[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why do people still use this language? Why does it even still exist?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 67
Thread images: 3
Why do people still use this language? Why does it even still exist?
>>
>>55205421

this triggers the NEET
>>
Easy to pick up, great support.
>>
>>55205436
There are many languages that are easy to pick up, have great support, and are still actual good languages.

For example: Ruby, Python, Javascript, Java (sort of)
>>
>>55205451
None have more server-side support among existing hosting services.
None of those are as easy to pick up for web dev as PHP is. You will either write clumsy looking code, or will require a framework, to write even simple code. That's not easy to pick up in my book.
>>
>>55205421
- most of the shared web hosting service only propose a PHP + MySQL server.
- great support
- functions for everything
- frameworks can make it nicer to use
>>
>>55205509
>most of the shared web hosting service only propose a PHP + MySQL server.
^this

when you want to get into "programming" you start with HTML for immediate results, and once you require some kind of database and get a server, you naturally learn PHP because it's the most suggested language for the job.

At least that's how I learned it.

I know some python but i have like no use-case for the shit (yet).
>>
From my experience, only people with no hands on experience or knowledge of it, bash it because of some rumours which they've read somewhere and which are non-existant in recent versions.
>>
>>55205421

speed. both in language acquirement and in performance.

also, cheap hosting support
>>
>>55205421
>Why do people still use this language?
Good question

>Why does it even still exist?
Well technology doesn't just disappear once something better comes along. See: ALGOL, FORTRAN, COBOL, C.
>>
>>55208017
>and in performance
no
>>
>>55207024
idk i just hate using it for some reason. not as much as i hate python, but still hate.
>>
is there an easier language to hand variables from one page to another than php?
>>
>>55207024
>non-existant in recent versions.

Not entirely. PHP is lightyears better than where it used to be historically, but it still has its issues.
>>
Php is alright.

Javascript is bullshit though. It's like they developed C or Java but then took out everything that makes it usable
>>
>>55206806
>I know some python but i have like no use-case for the shit (yet).
Python with Flask and SQLAlchemy is pretty nice for web development
>>
>>55205431
/thread
>>
>>55205451
>and are still actual good languages
>>
>>55208874
JavaScript is Scheme with a C-like syntax.
>>
>>55209789
>JavaScript is Scheme with a C-like syntax.
>>
>>55209826
It is

https://brendaneich.com/tag/history/

Based non-SJW Brendan Eich
>>
>>55209850
>>55209826
Also, it's a helluvalot better than PHP

http://news.php.net/php.internals/70691

>Back when PHP had less than 100 functions and the function hashing mechanism was strlen(). In order to get a nice hash distribution of function names across the various function name lengths names were picked specifically to make them fit into a specific length bucket.
>>
>>55209850
>listening to the faggot who fucked this shit up and wasn't man enough to come up with something better in 10 days
It's a SELF with a C-like syntax at best.
>>
>>55209876
>Also, it's a helluvalot better than PHP
Wow, it's fucking nothing.
>>
>>55209908
>calling Brendan Eich a faggot
Found the SJW web cuck
>>
The fact that PHP only gives warnings on certain things that would be treated as compile/runtime errors in many other languages makes it difficult to deal with when you're a web provider who has to host sites for people who ignore these warnings. PHP is the only language I know that has the ability to fill logs with these warnings, and the only language I know of that has a config file. Because of all this, it doesn't feel like a language at all, and it only feels like a hassle.
>>
>>55209923
>>55209908
>samefagging to make a point about javascript
lol
>>
>>55209925
Pretty ironical, considering that js the language mostly used by half faggots and cucks.
>>
https://evertpot.com/PHP-Sucks/
>>
>>55209949
>getting angry once one responses to your samefagging with two messages as well
>>
Why did php become popular?
It is just scripting language which outputs html or something else.
php interpreter could be easily replaced in web servers.
Every page could be a fucking c, python or any program which would output html.
Why is php so popular?
>>
>>55209948
>warnings
You know you can make PHP treat warnings as errors in your code, right? And you can also set how these errors should be reported?

If you don't disable the default output and redirect to your custom "HTTP 5xx oops, something went wrong" handling function, you are a lousy web dev.

Also
>hosting sites
>not isolating every user into their own virtual machine
>>
>>55210012
>Why did php become popular?
The alternatives then were C and Perl < 5 which are both pretty bad.
>>
>>55210012
>Why did php become popular?
Because compared to Perl, it's pretty nice.
At least in the mod_php variant (contrary to the default Perl as a CGI script approach)

>Why is php so popular?
It's not popular anymore, now people use Tomcat or whatever the fuck C# uses for enterprise stuff, and Python + nodejs + react + angular or whatever the fuck the latest hipster frameworks are called.
>>
>>55206806
>writing all your data, domain and view logic in a single file
enjoy your shit maintainability.
>>
>>55210013
>You know you can make PHP treat warnings as errors in your code, right? And you can also set how these errors should be reported?
Yeah, but I found no way to kill script processing on warnings even after searching for a while. If there's an easy way to do that, then I would instantly tolerate PHP a bit more.

>If you don't disable the default output and redirect to your custom "HTTP 5xx oops, something went wrong" handling function, you are a lousy web dev.
I don't report errors to HTML output, never did.

>>not isolating every user into their own virtual machine
>having dozens of webservers running
>>
>>55210115
>>>not isolating every user into their own virtual machine
>>having dozens of webservers running
>not knowing what docker or containers are
Pleb
>>
>>55209964
>js the language mostly used by half faggots and cucks that make more money than I will ever do
ftfy
>>
>>55210166
Even if I were NEET like you that wouldn't disprove my point.
>>
>>55210187
By all means, stay angry at the future, grandpa. I'm pretty sure ASP will be a hireable language to know again real soon.
>>
>>55210144
Still doesn't get rid of the fact that I'm wasting overhead on virtualisation
>>
>>55210408
It's a lightweight container, not a full-blown virtual machine you idiot. And compared to the security hazard it is to run fucking client's own PHP scrips on your own servers, it's a small price to pay (if there's any overhead at all).

You know nothing about what you're talking about.
>>
>>55210045
Facecuck still uses it, although heavily modified
>>
>>55211237
No, they're using HHVM (they used to use the HH compiler).
>>
>>55211257
>By using the principle of JIT compilation, executed PHP or Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into the x86-64 machine code, optimized, and natively executed.
>executed PHP or Hack code
so they are still writing the site in PHP
>>
>>55211281
Oh, you meant still using PHP. Yeah, for sure, but not in the traditional sense.

I thought you were talking about CGI and Perl.
>>
>>55210068
Huh? No one does this in php.
>>
File: 1460366537733.png (394 KB, 598x564) Image search: [Google]
1460366537733.png
394 KB, 598x564
>>55208017
>interpreted language
>performant
>>
>>55210115
<?php
error_reporting(0);
?>

if done right, your script doesn't abort if warnings and simple errors happen. You can even disable more to execute scripts that are actually not even working.
>>
>>55208252
what's better than C for, say, kernel development or device drivers? Or heavily optimized applications that need every single bit of performance(load balancers come to mind)
java is out from the get-go because no inline assembly
>>
>>55208252
>Well technology doesn't just disappear once something better comes along.

What's better than PHP?
>>
>>55212025
Virtually anything. No other "web technology" has singel-handedly caused so many security issues than PHP.
>>
>>55211918
JIT compilation leads to some great performance advantages. HHVM is actually pretty fast.
>>
>>55212074
yeah, but you'd probably still be hard-pressed to beat java at number crunching.
>>
It seems to offer a lot more flexablitiy when compared to other prebuilt frameworks like rails (in a fan of rails though)
>>
>>55206806
>when you want to get into "programming" you start with HTML for immediate results, and once you require some kind of database and get a server, you naturally learn PHP because it's the most suggested language for the job.

100% correct
>>
>>55212052
That's not PHP's fault. If you set it up correctly, and write good code, it's secure. If you _couldn't_ write unsecure code, it would be extremely limited.

And of course the biggest, most used technology will have caused the most security issues. Just like Windows has the most malware. Not necessarily because it is the most insecure, but because it is used by virtually everyone.
>>
>>55213293
>That's not PHP's fault. If you set it up correctly, and write good code, it's secure. If you _couldn't_ write unsecure code, it would be extremely limited.
Weak typing alone allows all sort of injections. Half of the string comparison functions will fucking shit all over themselves and be easy to manipulate if you simply add a '[]' to GET or POST parameters so become arrays instead of strings. PHP sessions are a joke and session IDs are easily predictable (plenty of exploits for this around).
>>
>>55210012
>>55210043
Not just C and Perl, but in the form of fucking CGI. It was a huge pain to set up and use.

PHP was revolutionary in that instead of HTML embedded in code, you had code embedded in HTML. This was ridiculously much more convenient since most dynamic web pages were 95% HTML and 5% logic (Javascript was not really a thing).

It was a brilliant invention by Lerdorf and I respect him a lot for it.

Obviously the language is shit, but the paradigm was amazing and is still widely used.
>>
>>55208297
>>55211918

think in relative terms not absolutes you autistic faggots
>>
>>55205421
t. Noob who can't figure out PHP
>>
>>55205451
>var javascript
>var good
>>
>>55210115

just catch warnings and do an exit senpai, easy as fuck
>>
>>55213342

well that means assembly is bad too b/c you can write retarded code in it?

ffs, just don't write bad code
>>
PHP is a fractal of bad design.

The language can't even decide whether it wants to be OOP or Imperative.

For example, the officially supported way to connect to MySQL database with sanitized input is to use PHP->PDO Which is a completely different paradigm than how you're probably writing other logic.
Nevermind the horrible inconsistencies within the language, and the fact it promotes terrible programming habits.
>>
kek
>>
>>55205421
PHP without a frame work is awful.

PHP in the hands of a sloppy programmer is awful.

PHP with a framework and in the hands of someone who cares about their work is incredibly powerful.
Thread replies: 67
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.