Update page 'Future P# Versions'

2018-07-18 22:19:46 +02:00
parent f62cd45e1a
commit e6ab690ead

@@ -26,17 +26,13 @@ Structure members can be access by using a dot operator (.). The arrow operator
### Exponentiation Operator ### Exponentiation Operator
A right associative \** operator can be added to support exponentiation, along with a \**= shorthand assignment operator. A right associative \** operator can be added to support exponentiation, along with a \**= shorthand assignment operator.
<% printf("2 ** 3 = %d\n", 2 ** 3); // 8
printf("2 ** 3 = %d\n", 2 ** 3); // 8 printf("2 ** 3 ** 2 = %d\n", 2 ** 3 ** 2); // 512
printf("2 ** 3 ** 2 = %d\n", 2 ** 3 ** 2); // 512
%>
### Null Coalescing Operator ### Null Coalescing Operator
The ??-operator could return the left side as long as it's not null, in that case the right side would be returned The ??-operator could return the left side as long as it's not null, in that case the right side would be returned
<% int $var1 = getValue();
int $var1 = getValue(); int $var2 = 7;
int $var2 = 7;
int $result = $var1 ?? $var2; // $result will be 7 if $var1 is NULL int $result = $var1 ?? $var2; // $result will be 7 if $var1 is NULL
%>