Why does 1…1 evaluate to 10.1? [duplicate]
This question already has an answer here: Why is '…' concatenating two numbers in my code? 1 answer I've just faced a little PHP snippet from 3v4l: https://3v4l.org/jmrZB echo 1...1; //10.1 And I'm afraid I have no idea how to explain its results. Why is this considered valid at all? axiac The dot ( . ) has two roles in PHP: As decimal digit, when it is part of a real number, e.g. 1.1 . Both the integral part and the decimal part are optional on real numbers but not on the same time . This means both 1. and .1 are valid real numbers in PHP but . is not a number. As the string concatenation