PHP3 Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Other incompatibilities

Example A-11. Migration from 2.0: concatenation for strings

echo "1" + "1";

In PHP 2.0 this would echo 11, in PHP 3.0 it would echo 2. Instead use:

echo "1"."1";
$a = 1;
$b = 1;
echo $a + $b;

This would echo 2 in both PHP 2.0 and 3.0.

$a = 1;
$b = 1;
echo $a.$b;
This will echo 11 in PHP 3.0.


PrevHomeNext
Function true/false return valuesUpPHP development