PHP RFC - Deprecate backtick operator
- Version: 42.0.0-epsilon
- Date: 2018-02-11
- Author: WesNetmo
- Status: Under Discussion
- First Published at: https://wiki.php.net/rfc/deprecate-backtick-operator
The backtick operator (
`dir D:\foo`) is used to execute commands via shell.
The same functionality is also available as
This RFC proposes to deprecate (by triggering one among E_DEPRECATED, E_STRICT or E_NOTICE) it in PHP 7.3 and suggest to use
- in case PHP decided in future to use backtick enclosed strings for Unicode strings
- because it is a shady way to execute a rare and dangerous operation
- because it is weirdly specific to a rare operation; regexp literals, xml-strings literals are way more common use cases, but they don't have a specific string literal
Backward Incompatible Changes
None, the feature will continue to work until it is removed in future PHP versions, but a notice will be emitted.
Proposed PHP Version:
2/3 majority will be required.