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
-
dcode4288yIn the last 12 years i never had to compare -1 to NULL. Could you bring an example please to let us know in what real life situations do you have to use this kind of comparsions?
-
atulmy2698yIts just a programming language for web. Nobody gonna use it for anything other than that. It simple and easy for a non computer science background person to actually learn and build the idea he/she always wanted to or atleast get a fair paying job. It makes an impact in the real world. Look how many people got job because of wordpress alone. And there is Laravel and Magento. It certainly has made the world a better place to live. Without it i bet there would be less websites live on internet right now. Are you convinced yet?
-
@atulmy I won't deny it's usefulness, nor its positive impact on the internet. I was simply releasing some built-up annoyances with the language and its standard library. However, I do believe that it's time for either major change, or the phasing out of PHP for medium-large scale applications.
-
@dcode maybe that one was a low-blow, I apologize. Such strange comparisons are present in many languages, not just PHP.
-
zshh38538yYeah same here, I don't hate it but it's really painful to use when it's so inconsistent. If I can choose I'll choose any other language.
-
zankar20758y@TWilson023 php *can* be used in large scale applications but only when done absolutely right and when using php7.0.
Failing to do either on the other hand definitely can't survive on large scale applications -
@Codebeard Oh, I can't remember the last time I had a complaint about C++, but I'm quite biased as I mostly work in web development and rarely get to enjoy the level of control and power that C++ offers.
-
@TWilson023 Oh so you are more used to, "hold my hand" languages like python and ruby.
Check out this dragon:
public function __construct () {
$arg = atan2($this->_I, || $this->_d);
if(M_PI <$arg || $arg < -1*M_Pi){
.....
}
Did that scare you?
What about this:
#include <complex>
#include <cmath>
#include "dragons.h"
std::complex <double>ztype_dragon = std::exp (li * PI); -
@Codebeard unfortunately, the "hold my hand" languages seem to be what make me money at the moment. I do, however, take every chance I get to work with lower level languages like C/C++. Seeing your "dragons" reminded me how much I miss generics (at least I got to work in C# for an ASP.NET project a few months back). I'm hoping to get back into more embedded/systems programming when I find some free time, because I'm sick of these high-level money-makers.
-
@TWilson023 No shame in programming in high level to make money. I was just joking with you.
Anyway, php made me a lot of $$$.
I came from a C/C++ background so Web development never interested me back then, only servers. Then I got into PHP which was based on PERL and C++, picked that right up and never looked back. I never considered the PHP language anything special. It got the job done as far as servers, db and speed were considered. You could make some fast loading Web apps. It's still powerful enough or even more so in this day and age.
I never understood why so many people ranted off PHP and picked on it constantly. They do Node js, so they pick on their grandfather PHP. There is no logic in that. All the developers I know who do Node js have never done a day of JS in their life.
Learn everything you love or everything you need. Everything has a purpose, otherwise it wouldn't exist in the first place. -
erik40415858y@Codebeard PHP 7.0 + forcing strict mode and implementing the right way to expect types in logic etc makes a good language. We just need to forget that PHP < 7 every excited :)
Also my company is called Codebeard ;) -
@erik404 Really? Your companys name is Codebeard. I would have to see that to believe that. 😊😆😃😉
(Put my avatar as the company logo.)
Related Rants
It's not that I hate PHP, I just hate the lack of consistency in standard function naming and parameter order, nonsensical attribute access, nearly-meaningless comparison operators, reference handling, case (in)sensitivities, and more!
I mean, look at these functions:
strtoupper(...)
bin2hex(...)
strtolower(...)
And look at THESE FUNCTIONS:
array_search($needle, $haystack)
strpos($haystack, $needle)
array_filter($array, $callable)
array_map($callback, $array)
array_walk($array, $callable)
And let me jUST USE SOME ATTRIBUTES:
$object->attr = "No dollar sign...";
Class::$attr = "GOD WHY";
HOW ABOUT SOME COMPARISONS:
(NULL == 0) // true
(NULL < -1) // ALSO true
Functions AREN'T CASE SENSITIVE (at least variables are).
Wanna dereference? TOO BAD, YOU'LL HAVE TO GET OUT THE TNT.
Alright, yeah, I hate PHP.
undefined
death is upon me
end my suffering
hate
terrible
insanity
help me please
php