Other incompatibilities

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

  1 
  2 echo "1" + "1";
  3 

In PHP 2.0 this would echo 11, in PHP 3.0 it would echo 2. Instead use:
  1 
  2 echo "1"."1";
  3 
  1 
  2 $a = 1;
  3 $b = 1;
  4 echo $a + $b;
  5 

This would echo 2 in both PHP 2.0 and 3.0.
  1 
  2 $a = 1;
  3 $b = 1;
  4 echo $a.$b;
  5 
This will echo 11 in PHP 3.0.