rfc:language-constructs-syntax-changes

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:language-constructs-syntax-changes [2020/07/05 07:27] brzuchalrfc:language-constructs-syntax-changes [2020/07/22 08:36] (current) – withdrawning brzuchal
Line 3: Line 3:
   * Date: 2020-07-04   * Date: 2020-07-04
   * Author: Michał Marcin Brzuchalski, <brzuchal@php.net>   * Author: Michał Marcin Brzuchalski, <brzuchal@php.net>
-  * Status: Draft+  * Status: Withdrawn
   * Target Version: PHP 8.0   * Target Version: PHP 8.0
   * First Published at: http://wiki.php.net/rfc/language-constructs-syntax-changes   * First Published at: http://wiki.php.net/rfc/language-constructs-syntax-changes
  
-Language constructs syntax changes regarding the need for parentheses for ''declare'' and ''_''''_halt_compiler'' stemenents.+Language constructs syntax changes regarding the need for parentheses for ''declare'' and ''_''''_halt_compiler'' stamenents.
  
 ===== Introduction ===== ===== Introduction =====
Line 14: Line 14:
 A ''declare'' statement which is a language construct and not a function cannot be used as a function  A ''declare'' statement which is a language construct and not a function cannot be used as a function 
 nor in write context but require parentheses while some language constructs like ''print'' can be used as a function  nor in write context but require parentheses while some language constructs like ''print'' can be used as a function 
-but they don't require parentheses no matter of context. The same goes to ''_''''_halt_compiler'' statement which cannot+but they don't require parentheses no matter of context. 
 + 
 +The same goes to ''_''''_halt_compiler'' statement which cannot
 be used as a function nor in write context because it's not an expression and only looks like that. be used as a function nor in write context because it's not an expression and only looks like that.
  
Line 44: Line 46:
  
 <code php> <code php>
-__halt_compiler(); // syntax error+$foo = __halt_compiler(); // syntax error
 </code> </code>
  
rfc/language-constructs-syntax-changes.1593934026.txt.gz · Last modified: 2020/07/05 07:27 by brzuchal