This entry was posted on Monday, July 5th, 2010.
Written by: ShangNing
Today’s afternoon, I wrote an aimless code of PHP, that’s a good way to waste time I think. Then I created a simple line, and I assume the codes was wrong. But when I run the code, its output amazes me. The simple codes is:
<?php
print 1…1;
?>
The output is “10.1″, I have in mind some doubts which really puzzle me. Why is that? And I wrote more codes to try it:
<?php
print 1.1; // The output is 1.1, one dot, the result is really clearly
print 1..1; // Wrong, two dot, error clearly
print 1…1; // 10.1
print 1….1; // Wrong, four dot, yeah, error of course
print 2…2; // 20.2
print 6…3; // 60.3
?>
Only three dots mixed me up more, there is no the “three dots” operator in PHP language. So I wrote more testing codes:
<?php
$first=7;
$last=6;
print $first…$last; // Output is 70.6
print ($first.).(.$last); // Output is 70.6 too, em, I think its nearly the answer…
print ($first.); // wrong
print 7.; // wrong
// oh, no, I think I don’t know why…
?>
Last now, I still don’t know why this is. So, I submit it on PHP community and hope to get the question’s answer. If you know, please tell me, thank you.




KBguy asked me two questions.1. I always wanted to go to China but don't know where to starts first.There are a lot of good places, for example, Guizhou, Yunan, Sichuan or Fujian. We have the Yellow Mountains, Jiu Zhai Guo National Park, Lijiang...
The year is coming to an end and the holiday season has arrived, so now is the time to classify summary of statistical data. This blog was found in the 21th of March, I blog for improve my English writing ability first, and now, it is the most important..
It was snowing when I woke up today, it is the first winter snow, it is snowing now, all the buildings and cars are white, very beautiful, I like it very much. I went out and took some photos, and uploaded them to my Flickr.There are some photos about...
There is no "About Me" long time, because I do not have own photograph of smiling. Just take a look, good photos always wears a smile. Oh, god, my face looks awful, and what more I don't know how to smile :(I am taking pictures of myself all..