I migrated my website from PHP 4.4 to PHP 5.2 The error_reporting level in both cases is E_ALL. On PHP 4 the site was working fine but after migrating to PHP 5 i found that one page is throwing error. Cannot redeclare ClassName:varName I found that the variable was indeed re declared in the file. I want to know that why it was working in PHP4.4 Does PHP 4 E_ALL not include "class variable redeclare errors"?
+2
A:
I think it's not about error reporting, it's about OOP support in PHP4 and PHP5. There were lots of changes in PHP5 regarding OOP. OOP support in PHP4 was quite funny.
zilupe
2009-05-15 09:39:43
A:
i am going to have to agree with Zilupe on this, PHP5 brought in more standardized OOP support, to the point where you can extend a class, but you cannot redeclare it. PHP4 and OOP i never thought really existed in the same sentence without the usual LOL, ROFL etc
Marc Towler
2009-05-15 10:52:09