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
-
tmux20198yThink this would do the same but more readable.
Function kill_with_fire($doomed_object = this){
$doomed_object = FALSE;
$doomed_object = NULL;
unset($doomed_object)
return NULL;
} -
neonoxd158yit's kind of like, when you use your calculator to calculate 2+2 in a test. Just in case.
-
arekxv10548y@tmux It would be more readable but it wouldnt do the same. If you pass false as doomed_object, your code would not do the same as his.
Aside from that... I would probably use this function on the person who wrote these functions... ugh... -
@omgashnames I want to know how they made it almost 2000 lines without is_true()! What golden code lies above we won't know...
-
m0j0nz0r3458yKill with fire doesn't even do its job right. If you pass it false it will simply go into an Infinite loop. This is painful.
-
johnDoe32338yShouldn't the else statement be
else{
$doomed_object = true;
$this->kill_with_fire($this);
}
Otherwise it'll just call a recursive infinite loop on itself -
johnDoe32338y@PlasmatikSteak so the function is passing in it's own class... I would really like to know what the rest of this class looks like.
-
Leya17768yI really want to look at the supposedly funny function in the middle but I'm to distracted by the beauty of the other two
Related Rants
Found this today.
It's in production!
undefined
code
hmm
production