rfc:propertygetsetsyntax-v1.2

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:propertygetsetsyntax-v1.2 [2013/01/17 20:40]
nikic Change status
rfc:propertygetsetsyntax-v1.2 [2017/09/22 13:28] (current)
Line 3: Line 3:
   * Created: 2012-12-29   * Created: 2012-12-29
   * Updated: 2013-01-17   * Updated: 2013-01-17
-  * Author: Clint Priest <phpdev at zerocue dot com>+  * Author: Clint Priest <cpriest at php dot net>
   * Contributors: Nikita Popov   * Contributors: Nikita Popov
-  * Status: Voting+  * Status: Declined, Vote Failed
  
 ==== Fork ==== ==== Fork ====
Line 446: Line 446:
          
     public $dataArray {     public $dataArray {
-        &get { return $this->_dataArray; }+        &get()       { return $this->_dataArray; } 
 +        set(&$value) { $this->_dataArray = $value; }
     }     }
 } }
Line 567: Line 568:
  
 Implementation Details Document: https://wiki.php.net/rfc/propertygetsetsyntax-implementation-details Implementation Details Document: https://wiki.php.net/rfc/propertygetsetsyntax-implementation-details
 +
 +===== Impact on APC and other Zend extensions =====
 +
 +In addition to the "implementation details document" linked in the previous section this section outlines the impact the accessors implementation has on APC and other Zend extensions.
 +
 +Most Zend extensions should not be affected by this change. Accessors are normal ''zend_op_array''s, they are called as any other function and have a meaningful name. As such extensions like XDebug should not need any adjustments to support accessors.
 +
 +One extension that will require minor changes is APC. APC has to copy all ''zend_op_array''s and ''zend_property_info''s because they may be modified at runtime. Due to this proposal additional ''op_array''s may be located in  ''property_info->accs'' and need to be copied too. Here are the code snippets that need to be inserted in APC to do this: https://gist.github.com/4615156 (full code with the changes: https://gist.github.com/4597660). Other extensions that do something similar will require updates along the same lines.
 +
 +Thus the impact of the change on Zend exts is rather small.
  
 ===== Tests ===== ===== Tests =====
Line 576: Line 587:
 Voting ends not before Wednesday, January 23rd 2013. The PHP language is expanded, so a 2/3 majority is required. Voting ends not before Wednesday, January 23rd 2013. The PHP language is expanded, so a 2/3 majority is required.
  
-<doodle title="Accept PHP Accessors for 5.5?" auth="cpriest" voteType="single" closed="false">+<doodle title="Accept PHP Accessors for 5.5?" auth="cpriest" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/propertygetsetsyntax-v1.2.1358455215.txt.gz · Last modified: 2017/09/22 13:28 (external edit)