rfc:nullsafe_operator

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:nullsafe_operator [2020/07/16 09:46] – No need to subchain in rhs of assign ilutovrfc:nullsafe_operator [2020/07/31 08:55] (current) – Close vote ilutov
Line 3: Line 3:
   * Date: 2020-06-02   * Date: 2020-06-02
   * Author: Ilija Tovilo, tovilo.ilija@gmail.com   * Author: Ilija Tovilo, tovilo.ilija@gmail.com
-  * Status: Under discussion+  * Status: Implemented
   * Target Version: PHP 8.0   * Target Version: PHP 8.0
   * Implementation: https://github.com/php/php-src/pull/5619   * Implementation: https://github.com/php/php-src/pull/5619
Line 109: Line 109:
 $foo?->bar(expensive_function()); $foo?->bar(expensive_function());
 </code> </code>
-The evaluation of ''%%expensive_function()%%'' is undesirable if ''%%$foo%%'' is ''%%null%%'' as its result will simply be discarded. If the function has side effects it could also lead to surpsises.+The evaluation of ''%%expensive_function()%%'' is undesirable if ''%%$foo%%'' is ''%%null%%'' as its result will simply be discarded. If the function has side effects it could also lead to surprises.
  
 **2. You can see which methods/properties return null** **2. You can see which methods/properties return null**
Line 162: Line 162:
 ===== Syntax choice ===== ===== Syntax choice =====
  
-The ''%%?%%'' in ''%%?->%%'' denotes the precise place in the code where the short circuiting occurs. It closesly resembles the syntax of every other language that implements a nullsafe operator.+The ''%%?%%'' in ''%%?->%%'' denotes the precise place in the code where the short circuiting occurs. It closely resembles the syntax of every other language that implements a nullsafe operator.
  
 ===== Forbidden usages ===== ===== Forbidden usages =====
Line 232: Line 232:
 ===== Vote ===== ===== Vote =====
  
-Voting starts 2020-xx-xx and ends 2020-xx-xx+Voting starts 2020-07-17 and ends 2020-07-31
  
 <doodle title="Add nullsafe operator to the language?" auth="ilutov" voteType="single" closed="true"> <doodle title="Add nullsafe operator to the language?" auth="ilutov" voteType="single" closed="true">
rfc/nullsafe_operator.1594892771.txt.gz · Last modified: 2020/07/16 09:46 by ilutov