That happens when we concatenate numbers in PHP

<?php
echo 10 . 3; // outputs 103, here 10 & 3 converted into strings

echo 'Ten' . 3; // outputs Ten3, here 3 converted into string

echo 10 . 'Three'; // outputs 10Three, here 10 converted into string

// Concatenation Operator (.) is used to add two strings, not float or integer.
?>

Comments

Popular posts from this blog

Timus 1209. 1, 10, 100, 1000... accepted solution in C

Timus Problem 1086. Cryptography Accepted Solution in C

Timus 1083. Factorials!!! Accepted Solution in C