3 ms·
Ah! Nice work - that makes total sense. Incidentally, PHP doesn't have the concept of positive or negative Infinity, just NaN. However, when I tried: print
by chris_wot 14y ago
Ah! Nice work - that makes total sense.
Incidentally, PHP doesn't have the concept of positive or negative Infinity, just NaN. However, when I tried:
print inval(1/0);
I got an exception. But point taken :-)
Edit: I might not be correct about positive or negative infinity in PHP... apologies if I have at all mislead anyone!
Also: got a proxy error, so this got reposted, then I deleted one of the posts, but the other post got marked deleted. So third post about this!
- saurik 14y agoPlease read my comment below regarding this behavior in PHP. In addition, I will add that 1/0 here is not returning NaN (if you attempt to print it as a string you won't get "NaN"), and intval itself actually has the same behavior as JavaScript. (edit: Oh, I just realized the other comment I replied to was also you. ;P)
- chris_wot 14y agoArgh! Sorry, proxy error caused all sorts of problems :(