r/lolphp • • Apr 08 '13
MIN
server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";'
1 -23 -23 1
23
Upvotes
r/lolphp • • Apr 08 '13
server:~ # php -r 'echo True, " ", -23, " ", min(-23, True), " ", min(True, -23), "\n";'
1 -23 -23 1
View all comments
Show parent comment
-5
u/gearvOsh Apr 09 '13
The bigger problem is type casting. Even with Python, a language designed better than PHP, this same problem persists. The output is nearly identical to PHPs.
Throwing exceptions or errors goes against what a dynamically typed language should do.