tags:

views:

133

answers:

3

What will the following code print? print ‘’four’’ * 200;

+7  A: 
Unkwntech
+4  A: 

Since the string cannot be casted to a number, the multiplication with a string will result in 0.

merkuro
Numeric strings can be casted to the integer they represent though.
Vinko Vrsalovic
+5  A: 

Yes it would print zero "0" indeed. The thing is PHP will type cast the string value to an integer. This would result in 0 (Zero); and if you times any value with zero you'll get zero.

Good Question Roland!

Conrad
This explains my answer, thank you Conrad ;-)
Roland