rfc:notice-for-non-valid-array-container

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:notice-for-non-valid-array-container [2016/08/16 17:20] bp1222rfc:notice-for-non-valid-array-container [2016/08/24 15:48] bp1222
Line 35: Line 35:
  
 This RFC aims to limit the quantity of warnings on a single line, however, large projects may have many locations that might need variable type checking around unknown container access.  Typically, one might assume access of a variable to be an array or object, and could do checks to make sure the variable about to be accessed is an array, or an object. This RFC aims to limit the quantity of warnings on a single line, however, large projects may have many locations that might need variable type checking around unknown container access.  Typically, one might assume access of a variable to be an array or object, and could do checks to make sure the variable about to be accessed is an array, or an object.
 +
 +===== Performance Impact =====
 +Test run was:
 +<file php>
 +<?php
 +$a = false;
 +for ($i = 0; $i < 1000000; $i++) {
 +    $a[0];
 +}
 +</file>
 +
 +Execution Time (DualCore 3ghz; 2g ram)
 +  * Current Master : ~0.09s (~489m operations)
 +  * Current Master w/RFC Displaying Warnings: ~33.25s (~7.799b operations)
 +  * Current Master w/RFC Hiding Warnings: ~0.82s (~4.091b operations)
 +
 +We can see there is a significant increase in operations on huge loads.  However, I wouldn't suspect 1m of these errors per request almost ever.  So, yes there is; but I'd call it useful information overhead.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
Line 95: Line 112:
 Vote Start: 2016-08-16 15:36 Vote Start: 2016-08-16 15:36
  
-Vote End:   2016-08-23 23:59+Vote End:   2016-08-31 23:59
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
rfc/notice-for-non-valid-array-container.txt · Last modified: 2019/07/10 12:20 by nikic