Blog

PHP 5.4RC and Changes (warning and notices)

Posted by david on 26 February 2012 at 9:16 pm

The next version of PHP, which I am running here now, makes PHP a stricter language. That's good, but when you've been writing code for a long time sometimes you do not realize you are doing something wrong if it works. That has been the case here. I noticed some PHP warnings showing up a few weeks ago here. They had upgraded PHP to the latest RC, which I unfortunately run PHP 5.3 on my developer machine (not for long). The code on this site was almost a year old and I checked the code I would be uploading to check for any coding errors. It looked correct in my dev code. Unfortunately I had a class method returning a string, but some code that was using was older and expected an array. This was cauing warnings to show up, as it was being treated as an array, which is wrong. 

Comments

Log in to comment

No comments yet!