rfc:negative_array_index

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:negative_array_index [2018/02/12 18:09] – Prepare for new discussion pmmagarfc:negative_array_index [2018/02/22 21:12] – BC Break clarification pmmaga
Line 78: Line 78:
  
 if ($a[1] === true) { if ($a[1] === true) {
-    echo 'Accessing key 1 explicitly.';+    echo 'Accessing key 1 explicitly';
 } }
 </code> </code>
  
-Will no longer produce any output.+Will no longer output ''Accessing key 1 explicitly''. 
 + 
 +<blockquote> 
 +NOTE: If accepted, during the deprecation phase the ''E_DEPRECATED'' notice mentioned in the previous section would be emitted. 
 +</blockquote>
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
Line 89: Line 93:
  
 ===== Unaffected PHP Functionality ===== ===== Unaffected PHP Functionality =====
-Arrays with explicit keys, string keys, or an initial numeric index ''>0'' are not affected. This also means that arrays that never use explicit keys will still start with ''0''.+Arrays with explicit keys, string keys, or an initial numeric index ''>-1'' are not affected. This also means that arrays that never use explicit keys will still start with ''0''.
  
 Furthermore, iterating over arrays without explicit keys (ie. ''foreach'') is not affected. Furthermore, iterating over arrays without explicit keys (ie. ''foreach'') is not affected.
rfc/negative_array_index.txt · Last modified: 2020/08/01 23:40 by carusogabriel