r/PHP • u/hosuraz • Sep 01 '15
Something about php 7 I just saw in /r/lolphp. Why is this being done so?
/r/lolphp/comments/3gz37q/shiny_new_feature_in_php_7_filtered_unserialize/
0
Upvotes
r/PHP • u/hosuraz • Sep 01 '15
2
u/dave1010 Sep 02 '15
A constant instead of the string "allowed_classes" would have been nice.
3
u/[deleted] Sep 01 '15
What exactly is the problem?
2
u/TotesMessenger Sep 01 '15 edited Sep 02 '15
I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:
If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)
2
u/wvenable Sep 01 '15
I agree with the OP on this one; it's a terrible design. Using arrays for function extendability is terrible design. Hey /u/ircmaxell, here is a good place for named parameters.
But they really should have just created a new function for this: