rfc:error_handler_callback_parameters_passed_by_reference
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:error_handler_callback_parameters_passed_by_reference [2015/02/13 00:25] – updated open issues, adequestion 5 thbley | rfc:error_handler_callback_parameters_passed_by_reference [2015/02/27 23:16] – thbley | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Allow error_handler callback parameters to be passed by reference ====== | ====== PHP RFC: Allow error_handler callback parameters to be passed by reference ====== | ||
- | * Version: 0.1 | + | * Version: 0.2 |
- | * Date: 2015-01-26 (initial draft) | + | * Date: 2015-02-13 (voting) |
* Authors: Reeze Xia < | * Authors: Reeze Xia < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 172: | Line 172: | ||
==== Performance ==== | ==== Performance ==== | ||
- | TODO | + | Performance is not affected in normal code execution. In case of an error that can be handled in user-space, we need to copy the referenced variables back to their origins. |
===== Open Issues ===== | ===== Open Issues ===== | ||
Line 204: | Line 204: | ||
</ | </ | ||
- | This issue is not related to this rfc and handled separately | + | This issue is not related to this rfc and handled separately |
2. Callback parameter errstr can be changed to an empty string, example: | 2. Callback parameter errstr can be changed to an empty string, example: | ||
Line 260: | Line 260: | ||
$file, so an example would look like this: | $file, so an example would look like this: | ||
- | <file php error_log.php> | + | <file php test_error_log.php> |
function myErrorHandler($errno, | function myErrorHandler($errno, | ||
switch($errno){ | switch($errno){ | ||
Line 290: | Line 290: | ||
</ | </ | ||
- | ===== Proposed Voting Choices | + | ===== Vote ===== |
- | This RFC requires a 50%+1 majority. | + | This RFC requires a 50%+1 majority, |
- | + | ||
- | There will be three options: | + | |
- | + | ||
- | 1. Allow $errno, $errstr, $errfile, $fileno parameter to be passed by reference | + | |
- | + | ||
- | 2. Allow $errstr parameter been passed by reference | + | |
- | + | ||
- | 3. No, Allow none of the parameter be a reference parameter | + | |
+ | <doodle title=" | ||
+ | * Allow $errstr parameter to be passed by reference | ||
+ | * Allow $errno, $errstr, $errfile, $fileno parameter to be passed by reference | ||
+ | * No, Allow none of the parameter be a reference parameter | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
- | Currently implemented on https:// | + | Currently implemented on https:// |
PR is against master and includes the first four callback parameters to be passed by reference. | PR is against master and includes the first four callback parameters to be passed by reference. | ||
+ | The PR will be updated to correspond vote if any one of the accepted. | ||
I've used to build on Ubuntu 14.04: | I've used to build on Ubuntu 14.04: | ||
Line 322: | Line 320: | ||
===== References ===== | ===== References ===== | ||
- | Discussion on php-internals: | + | * Discussion on php-internals: |
- | Discussion on Github: https:// | + | |
===== Rejected Features ===== | ===== Rejected Features ===== | ||
Line 331: | Line 329: | ||
===== Changelog ===== | ===== Changelog ===== | ||
- | v0.2 - updated open issues (thbley) | + | * v0.2 - updated open issues (thbley) |
- | v0.1 - Initial draft (thbley) | + | |
rfc/error_handler_callback_parameters_passed_by_reference.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1