Why do people say php syntax is ugly ?

why do people say php syntax is ugly ?

Attached: carbon.png (3520x2152, 200K)

Other urls found in this thread:

carbon.now.sh
secure.php.net/manual/en/book.spl.php
github.com/symfony/messenger
secure.php.net/manual/en/functions.arguments.php#functions.variable-arg-list
github.com/composer/packagist
blackfire.io/
github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
github.com/leocavalcante/siler
medium.com/fuzz/php-a0d0b1d365d8
twitter.com/SaraMG/status/1027587230557188098
externals.io/message/102415
twitter.com/NSFWRedditGif

JavaScript babbies never seen a $ before.

ugh, i guess you forgot about
$('#id')

Don't forget your meds, grandpa.

'becuase' . 'it' . 'is';

People don’t say PHP is ugly, people say work with PHP is ugly.

>Public static function main()

PHP is only ugly when it tries to be Java. OOP was a mistake.

Your face is ugly

Babies first programming language.

It's like with Perl. (In fact, PHP is a lot like Perl). You can write some pretty ugly code in PHP. But you can also write short and elegant code that's very readable. It all depends on the author. (You don't have to use OO just because it's there.)

It's fucking hideous. Not even an OS X screenshot could fix it.

It's trying WAY too hard to look like an actual programming language.
Stick with the real deal instead of this bogus crap.

Php offers the opportunity to write some really shitty code because the language is so relaxed. Also it is one of the most used languages. So a lot of shitty code exists. A lot of really good code exists though too. The butt hurt folks probably had to do a lot of code rewrites from shitty programmers. They then blame the language for allowing it to happen.

this

show us more of this elegant code so we can all stand in awe of its beauty

Because using the $ sign is typical american imperialism

php isn't only ugly, it's shit

that's some real comfy UI, is it riced OSX or does it just look like that?

This is just normal OS X. I think it kinda looks like Atom.

- php still requires $-prefixed variables because it's no secret the team has always been incompetent
- php has absolutely no module system, so you're forced to use classes
- classes have some kind of dumb limited syntax support for static variables, you'll have to declare them as null and initialize them through a method call unless they're simple primitive values
- lambdas require you to explicitly declare each variable you want them to close over, something like &$variable. just fucking kill me
- list - map - object semantics are a complete mess. for some reason lists and maps are the same construct, but maps and objects are different even though they're both basically maps.
- referencing a missing key on an array causes php to shit itself

That's Terminal and not iTerm 2?

Of course it looks good with something simple like Hello World

PHP was never meant to be anything more than short executable statements embedded within HTML pages.
So you all can quit trying to compare it to programming languages used for implementation of programs.

I would agree if it actually wasn't used for building big commercial applications and morons like OP and co didn't claim it was a good language.

You probably think you're not that ugly too, huh?
user....

It's OK to do some medium sized stuff I guess. However if you tried it on a big project with a team of 10 or more, I'd say you're pretty much prone to shooting yourself in the foot every other day.

yeah, it's really alright, but not good. like you said it's easy to just replace it with a better language so there's not much reason to use it for any large project. but people still do and that gets fun. I blame brain-dead frameworks like laravel and "code artisans" for that.

There's also an endless library of objective problems with the language.

However bad you think C++ is, PHP is quite literally 10x worse.

Attached: php-loose-comparisons.png (715x408, 23K)

Not using === everywhere

>scoping rules is now java

brainlet

"is"+"this"+"better?";

Yes, especially since the dot is not freed up for attribute and method access.

>1 + 1 = 11

Yea so much better!

>"1" +"1" = "11"
Why am even replying to this bait

The heck? Mine doesn't look like that

the screenshot was taken with carbon.now.sh

Thanks. That explains the filename

>#$%@$#%@#%^#@$@#^%
fuck off

here's something more realistic, how is this ugly ?????

Attached: Screenshot (86).png (1366x1536, 1M)

>- list - map - object semantics are a complete mess.
>- referencing a missing key on an array causes php to shit itself

secure.php.net/manual/en/book.spl.php

have a good read.

>laravel

i would take symfony or zend framework any day

here, take a look :
github.com/symfony/messenger

Thats jQuery for JavaScript. A good friend of PHP, but not actually PHP. In big teams it wouldn't even be the same person working both.

yea, i know.
he said that js devs never saw $ , so ...

Oh, I read it as "Java devs" for some reason.

$('#value_x').val(1);
$('#value_z').val(1);
$('#value_x').val() + $('#value_z').val() = 11

They've never seen it in a masterfully riced terminal before.

I use it to build commercial applications, if you read my code your eyes would open up a bit. It really depends on how you structure it and what standards you adhere to.

Depends on what problem your trying to solve programming languages serve a niche they are not general purpose silver bullets.

With that said I know other languages and understand the pros and cons.

Why are you bringing the DOM API into this? Attributes are stored as strings no matter how you assign. Your own fault for not understanding it and has nothing to do with the argument. Can't expect much from nu-Jow Forums can I now.

>why are you bringing the only thing js is useful for into this?
>its your fault that the main use for the language requires gymnastics to do math

>that irrelevant example
>"js is only useful for manipulating DOM"
I'm sorry, but you're retarded, plain and simple.

thats not even manipulating, its reading
the setting value part is to show whats in these fields

??
Because it is??

Attached: php.png (450x389, 20K)

`...$args`
what the fuck

>str(1) + str(1) == "11"
It's your fault you gave a shitty, unrelated example

Your example is shitty and unrelated, you NEET hobbyist coder.

What JS is actually used for is shit like:
$('#value_three').val($('#value_one').val() + $('#value_two').val());


And yes, its inconvenient to parse everything before doing path every single time.
$('#value_three').val(parseFloat($('#value_one').val()) + parseFloat($('#value_two').val()));

maybe if wrote better code.

secure.php.net/manual/en/functions.arguments.php#functions.variable-arg-list

Attached: lol.jpg (380x380, 25K)

...

I see the trend of turning PHP into Java is still strong in the community/devs.

My boss keeps asking me to, but fuck that, 5000 lines of code in a single file that just does everything all the way. It works, and its on time!

...

developers like you are the reason people hate php.

developers like me are the reason work gets done, while academics in the next room optimize fizzbuzz algorithms

PHP golden age:

"get the job done"

you mean you write code that is unreadable , cannot be maintained or debugged, and its impossible to merge into the next PHP Major release ?

i bet you use wordpress too and hate frameworks.

actually that code still works.

>var is not an alias to public
>methods with not visibility are public

you may wanna replace 'require' by 'require_once'

var is an alias to public***

>"hello dev? this is management. we want this new functionality we never planned for. we want it yesterday."
>say no more, mr moneybags, i'm on it! it will be done by tomorrow!

And the company registered record profits. Nobody cares if the next time I have to copy-paste a full megabyte of text to expand it.

what basements is your company located at exactly ?

"hi dev, we upgraded php and now it doesn't work anymore"
"hi dev, why are errors showing up on the website"
"hi dev, what is this deprecated error we are seeing"
"hi dev, why is our website slow as shit ?"
"hi dev, we got hacked"

nation leading insurer broker, currently
in the past, a pharmacy distribution/warehouse and an airport ticket/sales and pricing system

what basement are you blogging from?

my company, where we actually write decent code.

here user, have a look at a real world project, written in the right way :
github.com/composer/packagist

>look at how pretty my code is

i dont care lmao
its not art
if it works its good, if it doesn't its shit
mine works, and works before yours, and doing a hackjob fix on a hackjob fix is easier than trying to do anything outside of the original plan and scope in a "well structured" project

get a few more years of experience and you will see the light

its not mine

i'm not talking about "how pretty it is"

its a maintainable code, that doesn't confuse users with errors left and right when something goes wrong, that you can debug and profile.

Yeah enjoy debugging that huge hack out of your ass. I've seen shitty hackjobs develop the most bizarre bugs over time and just giving IT teams nightmares, and in the end they give up and restart it every night or whatever before it fails.
Meanwhile good code can go through even multiple teams and evolve just fine. People like you are why rewrites happen, which end up costing a shitton of dev hours.

You're mom is ugly

in case you don't know what i mean by profiling your code : blackfire.io/

and desu i don't think you have more experience that the sensioLabs team ( team behind symfony, silex, blackfire, twig, swift mailer ... ) or the maintainers of packagist & composer or people at zend ( maintainers of zend framework and php core developers )

>that doesn't confuse users with errors left and right when something goes wrong

where did i say mine has errors? i have zero tolerance for users seeing anything but well formatted errors in the local language from handled exceptions
i am saying i don't have classes, everything separated tidily, etc. i prototype, and when it works i clean up and ship it for testing, when its tested i move it to live environment, i don't support a framework, my clients aren't programmers, i don't give a shit if it could be 0.07 seconds faster or if its not following best practices. it works. no errors, no security flaws, i can frankenstein add anything to it and if it needs a total rework, i have saved so much time throughout the months and years that i am justified in asking for more resources to rebuild

all three big projects i've worked on i was praised by the management and both times i hopped job was because i was poached for a bigger paycheck after some white shirt recommended me
if you think i am some low life scrub that you can do a self esteem battle with, i'd recommend closing the tab

does it work fine when you upgrade to the next major release ?
also , users are not supposed to see any error, not even in local language.

all the should see is a page with [error 505] and 2 lines saying that an error accord and the maintainer have been informed.

you should have something that implements LoggerInterface (github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md ) inside an error handler to report all errors, warnings, deprecation messages to you somehow.

i love how you didn't mentioned any of the other arguments tho.

-----------------------------------------------------------------------------------------

you don't have to do OOP btw, you can write good functional programming in php
here's an example :
github.com/leocavalcante/siler

we compare it to programming languages because people claim php is one. PHP is a raped and fucked beyond belief templating language

medium.com/fuzz/php-a0d0b1d365d8

probably gonna be updated on php 8.0
twitter.com/SaraMG/status/1027587230557188098

also JIT Compiler, Async, FFI and more features are coming to PHP in 8.0 :

externals.io/message/102415

It gets ugly with laravel