Re: RFC: Add a deprecated modifier for functions
| From: | Eugene L Kovalenja | Date: | Wed, 26 Dec 2012 21:04:35 +0000 |
| Subject: | Re: RFC: Add a deprecated modifier for functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-64438@lists.php.net to get a copy of this message | ||
Hello, Khalil
Could you explain the pros of your proposal in comparison with the next one:
<?php
function somethingWillBeRemovedInNextVersion() {
trigger_error('This function is deprecated. '
. 'Please use "newFunction" instead. ',
E_USER_DEPRECATED);
// functionality below
return 'something';} function newFunction() {
// ...} somethingWillBeRemovedInNextVersion(); From my point of view, the modifier for this kind of things is the restriction for developers, who want to inform user about details like "why we are going to remove this functionality". On 12/26/2012 04:22 PM, Yussuf Khalil wrote:
Hello, I have created an RFC about adding a deprecated modifier for functions in PHP, see https://wiki.php.net/rfc/deprecated-modifier. What are your thoughts on this? Thank you, Yussuf Khalil