Bug fix to examples with php5.2.