IHRIS PHP 5.3 Clean Up: Difference between revisions
From IHRIS Wiki
(Created page with 'There are several new features in PHP version 5.3 that clean up some kludgy code in iHRIS and I2CE which will improve code speed and readability. ==Late Static Binding== There i…') |
Sturlington (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
==Closures== | ==Closures== | ||
PHP 5.3 now supports closures and this can make the code more readable. | PHP 5.3 now supports closures and this can make the code more readable. | ||
[[Category:Archived Pages]] |
Latest revision as of 16:41, 8 November 2013
There are several new features in PHP version 5.3 that clean up some kludgy code in iHRIS and I2CE which will improve code speed and readability.
Late Static Binding
There is a new static feature (google Late Static Binding) so that we can do things like $val = static::$some_var instead of eval ('$val = ' . get_class($this) . '::$some_var;');
__callStatic()
Implement static fuzzy methods with the __callStatic():
- change I2CE_Form fuzzy methods to static fuzzy methods as appropriate so we don't need to instantiate a form object to call a fuzzy method on it.
Closures
PHP 5.3 now supports closures and this can make the code more readable.