ein Blog

PHP is weird, too

everybody is like "ooh! js is so weird because it has no data types but it kind of has and does all those weird things!"

now look at this:

% php -a
php > echo 1;
1
php > echo 1.2;
1.2
php > echo 1."2";
PHP Parse error:  syntax error, unexpected '"2"' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in php shell code on line 1
php > echo "2".1;
PHP Parse error:  syntax error, unexpected '.1' (T_DNUMBER), expecting ',' or ';' in php shell code on line 1
php > echo 1 . "2";
12
php > echo "1" . 2;
12
php > echo "1". 2;
12
php > echo 1 ."2";
12
php > echo 1 . "2";
12
php > echo 1 . 2;
12