I'm involved in a rather nasty debate involving a strange issue
(whereby the exasperated tell me to RTFM even after my having done so),
where this is insanely possible:
[PHP]
print_r(is_int( '1')); // PRINTS NOTHING
print_r(strlen( (int)1)); // PRINTS '1'
[/PHP]
Now I understand that in PHP, everything scalar is a string and can
take on the role of an integer, or a boolean or.. whatever it's
configured to look like. Why is it that I'm so "way off" in this
thread, when it seems to me that I have it right based on my basic
understanding the definition of "types"?
Phil
(whereby the exasperated tell me to RTFM even after my having done so),
where this is insanely possible:
[PHP]
print_r(is_int( '1')); // PRINTS NOTHING
print_r(strlen( (int)1)); // PRINTS '1'
[/PHP]
Now I understand that in PHP, everything scalar is a string and can
take on the role of an integer, or a boolean or.. whatever it's
configured to look like. Why is it that I'm so "way off" in this
thread, when it seems to me that I have it right based on my basic
understanding the definition of "types"?
Phil
Comment