PHP - Understanding the errors in php