Good vs. Evil

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

duckfan77

Popular Member
Mar 18, 2013
80
683
118
22 Most do, if the error is actually not valid code. In this case do to it being part of an inheritance structure everything was valid, it just didn't do what I wanted.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
22 Most do, if the error is actually not valid code. In this case do to it being part of an inheritance structure everything was valid, it just didn't do what I wanted.
20 except when its php and you manage to screw up working with its $_SESSION variable in a specific way.

In that case its unable to save the session after your script ran and thus only knows something wend wrong, but not where or when so it just says something along the lines of
Code:
in Unknown at line 0

With php's current setup there isn't much the developers can do about it, working with sessions was most likely made before objects where a thing in php so they had little choice of just having the session be an array that acted like any other. Additionally, because there where no objects back then there wasn't a problem of having to deal with objects that couldn't be serialized. As such I would even be in favor of it just being array instead of the alternative which would to include special syntax just for working with sessions.

But now there are objects, and thus also objects that can't be serialized and with the session just being a plain array there is little php can do to stop you from screwing up like that.
Sure, technically they can probably add some code that checks if what you assign something that can't be serialized, but then you get WTF's like
Code:
$SomeArray["someName"] = $someSpecialObject; //works
$_SESSION["someName"] = $someSpecialObject; //crashes??
2 things basically doing the same thing, but one crashes. Sounds like a wtf to me. Especially as you as php dev can't even make functions that run when you assign something to an array, if you could it would've been a lot less of a WTF, but as it stands......
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
10. I started trying to do this at 9. It’s nearly midnight and I still haven’t managed to get online yet. F**k’s sake...
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
7. I did actually manage to get on in the end :) And yeah, the death of Stephen Hawking is very sad - he was an extremely intelligent, brilliant man with a real drive, yet also a great deal of humanity and warmth. His loss will be felt for a long time.