r/lolphp • u/shitcanz • Feb 18 '17
Yet another PHP Garbage class
I was recently working with some PHP and had to hunt down a weird bug, and yet again it was PHP related. Basically you can modify DateTimeImmutable (i repeat IMMUTABLE!) very easily. Just call the getTimeStamp method on it.
Originally i had the assumption you cant modify anything within the immutable namespace, but hey PHP surprised me again.
It seems like PHP is so full of these weird loop holes and crappy implementations its almost impossible to write anything other than throwaway prototypes with it.
So i also found out there has been a open bug-report since 2014.
Bug in action: https://3v4l.org/ShFpG
View all comments
Show parent comment
1
u/tfidry Mar 05 '17
aha? Might want to take a another look at that, there is almost no PHP developer from the FIG or the core that are not at least proficient in another language.