Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
inaba46257y@mlask M8 I know php. Did it for like 3 years before I saw the light.
I took a vocational education called webintegrator where I did php -
inaba46257y@mlask the syntax is shit.
There's like 5 different cases.
mysql_escape_string and mysqli_real_esape_string. (Also, use prepared statements and PDO for the love of God)
sleep, usleep, nanosleep
Sometimes the errors would never make any sense
Allowing people to mix HTML and php code makes for some really annoying spaghetti.
Sometimes the order of parameters is inconsistent between functions
Anonymous functions aren't well designed
Then there's the rapid community of people insisting PHP is the best language with no faults
WordPress and the fact that a majority of PHP jobs are WordPress
That's what I can think of of the top of my head from my mobile
edit
-------------
Also this error: http://sandbox.onlinephpfunctions.com/... -
mlask8537y@inaba I agree, that syntax and inconsistency is - sometime - pain in the ass when coding in php. On the other side, it’s quite easy to learn, easy to deploy, fast and library independent. For other languages you’ll easily find lib for everything - which makes coding more like building with lego, without creative thinking, and also making code dependent on someone’s other code... Again - everyone should use whatever likes and knows the most.
-
inaba46257y@coda it doesn't really say what the problem is
@mlask Plenty of other languages are easy to lean and easy to deploy. Library independent doesn't mean much when the libraries you use are solid, and open source. Just like you're dependend on some libraries with other languages, you're depended on Zend for the PHP library. It's pretty much the same shit as with building with legoes -
coda807y@inaba it tells you EXACTLY what’s wrong. It’s not expecting an if statement to appear where it did.
It can’t tell you you’re missing a semi colon because there are plenty of other symbols that are valid after your statement.
In fact I’m not sure I’ve ever seen an error message that says “missing semi colon on line x” for any language. -
Y'all need prettier in your life. Even nested tenaries gets readable with it.
Still a valid point. Why the fuck. And I must ask what y'all talking of php, i only see Perl. -
Root826027yPlease please please enclose your ternaries in parentheses!
It's an unreadable mess otherwise.
Related Rants
$a = 1;
$b = 2;
echo ($a < $b) ? ($a > $b) ? 'This is totally fine' : ($a < $b) ? 'This is not ok!' : 'Perfect' : 'No problem here';
Why do people do this?!
(And I mean nested ternary ifs, not coding in PHP :P)
rant
bad-code
ternary
php