9th Aug 2017, 12:40 PM
Mohammed Hraich
Mohammed Hraich - avatar
3 Respostas
+ 7
PHP converts automatically numbers inside strings, as numbers! 1e3 = 1000 ('e' is basically the number of zero) The expression will be: if(1000==1000) echo "wow"; else echo "nop"; ... since 1000 is equal to 1000, the condition will be true!
9th Aug 2017, 12:49 PM
Maz
Maz - avatar
+ 1
"1e3" is the exponent form of 1000, that is 1*10^3 = 1000. So the condition evaluates to true and prints "wow".
9th Aug 2017, 12:48 PM
Steve Roche
Steve Roche - avatar
+ 1
thanks bro👍
9th Aug 2017, 12:50 PM
Mohammed Hraich
Mohammed Hraich - avatar