rfc:compact

Differences

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

Link to this comparison view

Next revision
Previous revision
rfc:compact [2018/05/25 02:04] – Create compact RFC carusogabrielrfc:compact [2018/06/19 10:52] (current) – RFC has been implemented cmb
Line 3: Line 3:
   * Date: 2018-05-24   * Date: 2018-05-24
   * Author: Gabriel Caruso (<carusogabriel34@gmail.com>)   * Author: Gabriel Caruso (<carusogabriel34@gmail.com>)
-  * Status: Under Discussion+  * Status: Implemented (PHP 7.3)
   * First Published at: https://wiki.php.net/rfc/compact   * First Published at: https://wiki.php.net/rfc/compact
  
Line 12: Line 12:
 ===== Proposal ===== ===== Proposal =====
  
-This RFC proposes the addition of a warning in the //compact()// function when a not defined variable had been passed to it.+This RFC proposes the addition of a notice in the //compact()// function when a not defined variable had been passed to it.
  
 <code php> <code php>
 $foo = 'bar'; $foo = 'bar';
  
-$baz = compact('foz'); // Warning: compact(): Undefined variable: foz+$baz = compact('foz'); // Notice: compact(): Undefined variable: foz
 </code> </code>
      
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
  
-Undefined variables passed to //compact()// will now be reported as a warning.+Undefined variables passed to //compact()// will now be reported as a notice.
  
 ===== Proposed PHP Version ===== ===== Proposed PHP Version =====
Line 31: Line 31:
  
 This RFC has only impact in the //compact()// function. This RFC has only impact in the //compact()// function.
- 
-===== Proposal and Patch ===== 
- 
-The patch (including tests) for this proposal is available in [[https://github.com/php/php-src/pull/3240|GitHub Pull Request #3240]]. 
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
  
 Since this RFC contains a Backward Incompatible Change, 2/3 majority is required. Since this RFC contains a Backward Incompatible Change, 2/3 majority is required.
 +
 +<doodle title="Make compact function reports undefined passed variables" auth="carusogabriel" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
 +Voting starts on 2018-06-06 and ends on 2018-06-18 23:00 UTC.
 +
 +===== Proposal and Patch =====
 +
 +The patch (including tests) for this proposal is available in [[https://github.com/php/php-src/pull/3240|GitHub Pull Request #3240]].
  
 ===== References ===== ===== References =====
  
 https://externals.io/message/102012 https://externals.io/message/102012
rfc/compact.1527213888.txt.gz · Last modified: 2018/05/25 02:04 by carusogabriel