>$this-> in front of every instance variable reference or method access >$ used at all not in reference to jquery > -> what the fuck is this >variable_and_function_naming_scheme >constants referenced with self:: >strings concatenated with .
i've spent more time looking up syntax than i have actually writing code. i thought java was bad
Dylan Reed
It's possible you're retarded
Christian Williams
Its probably based on perl and created by a complete retard
Ryan Lopez
php predates jquery idiot
David Williams
>help I am physically unable to learn programming languages that are even slightly different from the one I'm used to t. brainlet pajeet
Carson Hill
Of course PHP is shit. Why do you even want to use it?
Blake Barnes
>$this-> in front of every instance variable reference or method access Because there's no variable declarations it's impossible to tell whether the variable you're referring to is in function scope or in obbject scope otherwise. Python has the same problem. >>$ used at all not in reference to jquery. Perl used it. JQuery is younger than PHP >> -> what the fuck is this It's C/C++. >>variable_and_function_naming_scheme C again. >>constants referenced with self:: This one is kind of weird, but it's still C++. >>strings concatenated with . That's a good thing, it means stupid shit like adding numbers and strings won't be unpredictable as in Javascript. Also this is the reason the -> operator is used for member access rather than .
PHP is a poorly designed language, but not for any of the reasons you listed.
Parker Campbell
PHP sucks, and anyone who says otherwise is a braindead Indian, but Jquery deserves to die far more. It's a pile of shit used by people too dumb to just learn how to actually write JavaScript immediately. It's like training wheels for web development.
> -> what the fuck is this In any sensible language, it's used for anonymous functions, but PHP is a language for the retarded and by the retarded; therefore it uses it where it should use it's character for string concatenation.
Daniel Nguyen
>In any sensible language, it's used for anonymous functions lmao
Ethan Sullivan
>Perl used it. One of the many reasons it shouldn't be used is that Perl used it, but at least it had syntactic meaning in Perl.
>That's a good thing, it means stupid shit like adding numbers and strings won't be unpredictable as in Javascript. You haven't used many non-C family languages, have you? That means normal things that '.' does can't be done anymore. Plenty of decent languages use ^ for string concatenation, or just use an actual function for it and not an infix wannabe binop. PHP lets you add float and int with + though, may as well let you add strings with it too. At least go all in if you're going to go pajeet.
I'm pretty sure nearly all uses of PHP's string concatenation are cases where string concatenation wouldn't be needed in a normal language, like one that isn't just an overcomplicated template engine.
Valid PHP code: echo ['xddd'][0.666 - 0.420]
OP's opinions are mostly those of a brown little JS man, but he made some good points. He feels his obvious struggle with the language, yet is too dumb to realize it's not the awful syntax that troubles him, but the awful language as a whole.
Jose Nelson
>One of the many reasons it shouldn't be used is that Perl used it, but at least it had syntactic meaning in Perl. Agreed, I just needed to point out that comparing $ in PHP to JQuery was retarded. $ in PHP is an inconsistent piece of shit as soon as you get to OOP. > PHP lets you add float and int with + though, may as well let you add strings with it too. Being able to add two numeric types means you should be able to concatenate a numeric type to a string with the same operator? I don't see your point. Maybe a better choice of operator would have been better, but I'm glad that a weakly typed language with many implicit conversions choice to make addition and concatenation unambiguous.
Ethan Carter
>be early 2000s >internet is taking off >not many standards exist yet, very few people know how to actually do stuff, but everybody wants to be part of it >everybody wants a website for himself, his company etc. >they don't even have basic computing knowledge, most of them only started to use computers for a few months >guy who hates programmers and thinks they are cancer creates a programming language for the web designed for non-programmers >somehow everybody starts using it, and it's still alive in 2017 even though it was cancer then and cancer now
It needs to die.
Alexander Watson
op here.
>retard probably
>brown little JS man actually only used JS once, mentioned jquery bc it's the only place i remember $ being used frequently. pretty new to programming, only experience is in java and python for the most part.
>He feels his obvious struggle with the language, yet is too dumb to realize it's not the awful syntax that troubles him, but the awful language as a whole been reading more into php and i fucking hate it even more. the syntax is pretty broken as is, like i feel there's a lot of unnecessary shit (in whatever other languages use it too) but yeah fuck php
Gabriel Martin
good, stay away. PHP is only good today for basic HTML templating and there are better solutions for that anyway.
Brayden Cooper
Actually, PHP/fi (personal home page/form interpreter, yes, really) dates back to the mid-late 1990s. The magic ingredient, the crack rock what made PHP successful, was the ability to embed code in HTML, for free. How could CGI.pm ever compete, especially when Cold Fusion and Netscape Server were doing it and charging for it? I think logic-less templates of the curly-brace family are helping PHP sit down. >moral of the story: never trust a language designed entirely on irc
This, right here. Express.js just makes this stuff so easy.
Ayden Murphy
I don't like or even use PHP, but these are all non-arguments.
"It's not the way other languages look."
Ok.
Angel Davis
>le php is shit xD meme
Ayden Reyes
A reasonably orthogonal standard library that isn't wordy and puts needle and haystack parameters in a consistent order isn't just a luxury for the working programmer. Also a SQL db access library that doesn't support prepared statements and bound parameters needs to be thrown from a helicopter along with its author.
Colton Barnes
You have to be some kind of braindead retard to even remotely consider defending php in any way.
Dylan Powell
lmao php is for crappy kids I code in java like a real coder
Austin Barnes
In the street, pajeet.
Mason Allen
>look mom I totally roasted that poo in loo!!!! >lel xD stupid pajeet praise kek
Kayden Baker
There is like a billion languages less shitty. Pick any.
Adrian Martin
I mean, I like java a lot but rust sounds pretty interesting.
William Lewis
PHP is objectively shit, but you're fucking retarded.
Thomas Reyes
>Python has the same problem. Wut? Python could have implicit self/this without breaking variable scope. Java does it, you just have to explicitly refer to instance if local variable shadows instance variable. It would mess up decorators though. >When a method definition is decorated, we don't know whether to automatically give it a 'self' parameter or not: the decorator could turn the function into a static method (which has no 'self'), or a class method (which has a funny kind of self that refers to a class instead of an instance), or it could do something completely different (it's trivial to write a decorator that implements '@classmethod' or '@staticmethod' in pure Python). There's no way without knowing what the decorator does whether to endow the method being defined with an implicit 'self' argument or not.
Nathan Baker
>Java does it, you just have to explicitly refer to instance if local variable shadows instance variable. The local variable starts shadowing the instance variable once it is declared. Because Python does not have declarations, it must always assume you're referring to a local variable unless you use self.
Charles Butler
So is -> used for pointer members as well in php?
Juan Adams
>$this-> in front of every instance variable reference or method access Mostly because PHP isn't a pure object-oriented language and as such the scoping is bullshit. >$ used at all not in reference to jquery Who cares, shit's cash. > -> what the fuck is this C/C++ as some anons have mentioned by now. >variable_and_function_naming_scheme The bigger issue is the inconsistency between their usage of snake_case, camelCase and fuckallcase. But that's why you have autocomplete. >constants referenced with self:: Weird C++ shit. >strings concatenated with . At least now you know when you're dealing with strings in this loosely typed language.
William Hill
PHP does not have pointers. PHP does have references with & (somewhat like C++) but they're fucked.
Andrew Brooks
PHP is pretty bad, but most of your reasons are not valid. Your instance variable complaint is not valid. Your jQuery complaint is not valid because and PHP has little to do with jQuery. Your arrow complaint is not valid because it's juat the syntax and you can get over it. The naming scheme complaint is a valid complaint because there is within the core functions The self:: complaint is valid because it was not a well-thought out feature. The string concatenation complaint is not valid because that's the syntax, deal with it.
James Campbell
Whoops I fucked up a sentence. The naming complaint is valid because the core API cannot decide on one and instead chooses to use multiple styles.