rfc:deprecate-backtick-operator-v2
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:deprecate-backtick-operator-v2 [2019/10/04 18:36] – Noted CS Fixer existing solution marandall | rfc:deprecate-backtick-operator-v2 [2019/10/11 09:16] – Added argument against (thanks Derick) marandall | ||
---|---|---|---|
Line 21: | Line 21: | ||
* Alternative functions exist which are more descriptive, | * Alternative functions exist which are more descriptive, | ||
- | * Backticks are visually easily confused with single quotes despite exhibiting radically different behaviour. | + | * Backticks are visually easily confused with double or single quotes despite exhibiting radically different behaviour. |
+ | |||
+ | * This different behaviour is not subtle, in effect, one parses a string, a fairly simple operation, backticks on the other hand pause execution and takes the control flow completely outside of the PHP environment, | ||
* It could be considered unintuitive that single quoted strings do not support variable substitution, | * It could be considered unintuitive that single quoted strings do not support variable substitution, | ||
Line 27: | Line 29: | ||
* It could be considered unintuitive that backticks already rely on the safe-mode and disabled-function settings for shell_exec, and while this is documented, without viewing the php-src it is not immediately obvious why (AST compilation re-writes to a user function call). | * It could be considered unintuitive that backticks already rely on the safe-mode and disabled-function settings for shell_exec, and while this is documented, without viewing the php-src it is not immediately obvious why (AST compilation re-writes to a user function call). | ||
+ | * Certain language keyboards have no native key for backtick (An example provided by Girgias is the French AZERTY keyboard where you need to hold Alt GR + 7 + one or two Spacebar presses). | ||
+ | |||
+ | ===== Arguments Against ===== | ||
+ | |||
+ | * Backticks allow a combination of double-quotes and interpolation without needing to escape the double quotes. | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== |
rfc/deprecate-backtick-operator-v2.txt · Last modified: 2019/11/15 12:20 by marandall