+ 2
Are you kidding me php?
echo 2*"10 some string" will echo out 200 how come is that possible!? this is just wrong...
6 Respostas
+ 7
But why would you multiply an integer and a string in the first place?
+ 5
Abnet your question is only the tip of the iceberg.I know other languages are complex(to say),but php is weird especially when it comes to strings.
its only oop i know where you increment strings like::
$a="word";
++$a;
+ 2
I didn't It popped up in a challenge...
+ 2
because it multiplies with the first integer it can find in that string
php has a lot of weird interactions like this due to there not being type declarations
0
very weird! shouldn't they fix this?
0
Abnet it's wierd, but not a bug. see, as long as it isn't a syntax error, php will compile it most of the time.
but it is an intended interaction