PHP 7.1 has moved to skip the silent type-cast. This skips the ‘Undefined variable’ error, and yet, provides for both arrays and strings. Here is an example below :Īlthough it is not very clever to initialize a variable with a string and use it as an array, this was an old habit that took a good old in many developers’ code : the most versatile way to initialize a variable and forget about it is to use an empty string. This analysis spots variables that are used as raw conditions. It is recommended to prevent pcov to reach production, while weakref should not be forgotten. PHPunit uses them to establish the Code Coverage of a test suite.īoth extensions are now reported by Exakat. It works with PHPUnit, and provide the much-needed information about code line execution and control flows. Pcov is ‘a self contained CodeCoverage compatible driver for PHP7′. Weak references would be available, alongside the traditional references. This is useful for caching strategies : instead of accumulating cache during the life of the application, some objects are marked for priority unsetting. This means that an object may disappear during execution. The goal of the weak references is to allow the PHP engine to unset those references, in case it needs to free memory. This extension is authored by Joe Watkins. Wearef is both a PECL extension and a current RFC. To the Exakat 1.6.5 review, and beyond! weakref and pcov In particular, we add support for pcov and weakref, two interesting PECL extensions New analysis report variables that are used as conditions, and arrays that are initialized as strings (duh!) Finally, the Ambassador report and several previous analyses were extended, covering even more situations than before. The Exakat 1.6.5 review comes in with a lot of extensions and some new analysis.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |